[OS X TeX] OT: users and groups on Leopard
bvoisin at mac.com
Mon Mar 10 05:30:16 EDT 2008
Sorry for abusing this list with such an OT question, but after 2
hours of search I'm about to give up and try here as last-resort
measure before giving up completely.
Does anybody know how on Leopard one can access the list of users and
groups on a given Mac, together with their numeric equivalents (=
ids)? Here I mean not just the account owners on the Mac, but all the
users and groups defined by OS X for its various components and
services. On Tiger and before (or was it Panther?) it was very easy
using /Applications/Utilities/NetInfo Manager. On Leopard:
- There's /Applications/Utilities/Directory Utility, but it doesn't
seem to do exactly the same job.
- Apparently, starting from Tiger, OS X is no longer using standard
unix files such as /etc/passwd, /etc/master.passwd and /etc/group.
Instead, it's using a database-like mechanism involving such things as
Open Directory, Directory Services, and Access Control Lists. There's
a command-line utility dscl (Directory Service Command Line) that is
said to allow access to the list of users and the like, but after some
time studying its man page I couldn't find how to operate it properly.
Namely, typing in "dscl . -read /Users/bvoisin" returned all kinds of
info on my user account (including my id which seems to be 501), more
than I ever wanted to know, but how to get summary info on all the
- There's a massive amount of info inside <http://images.apple.com/server/macosx/docs/User_Management_v10.5.mnl.pdf
>, but it's really very technical and specific to OS X Server to some
extent. There's list of predefined user accounts and ids on p. 56, a
list of predefined group accounts and ids on pp. 90-91, and on p. 67
there are some details on user ids (namely that 0-100 are reserved for
system use while 501 and above correspond to users created via the
Accounts panel in System Prefs), but nothing more specific.
Could somebody having knowledge on these matters just point me where
My reason for asking that: an external hard drive I use for Time
Machine backups and also for manual backups of some files has
suddenly started to refuse any manual copy. There's room enough on
the drive for the copy, so that's not the issue. I traced this to
files and directories having switched ownership, for some reason, to
group 999 and for some of them to user 999, and to being only writable
by that user and group. Before changing the permissions, I would just
be sure that 999 hasn't some special meaning for OS X (like being
reserved for Time Machine use).
More information about the MacOSX-TeX