```select * from preferences where domain LIKE "co...
# macos
a
Copy code
select * from preferences where domain LIKE "com.apple.sharingd" and username = (select username from last where username not in ('', 'root') group by username order by count(username) desc limit 1) and key = 'DiscoverableMode' and value = 'Contacts Only';
+--------------------+------------------+--------+---------------+--------+----------+------+
| domain             | key              | subkey | value         | forced | username | host |
+--------------------+------------------+--------+---------------+--------+----------+------+
| com.apple.sharingd | DiscoverableMode |        | Contacts Only | 0      | allister | any  |
+--------------------+------------------+--------+---------------+--------+----------+------+