Skip to Main Content
Mac OS X for Unix Geeks
book

Mac OS X for Unix Geeks

by Ernest E. Rothman, Brian Jepson
September 2002
Beginner to intermediate content levelBeginner to intermediate
216 pages
7h 43m
English
O'Reilly Media, Inc.
Content preview from Mac OS X for Unix Geeks

Managing Users and Passwords

The NetInfo equivalent of the passwd file resides under the /users portion of the NetInfo directory. Mac OS X uses /etc/master.passwd for storing encrypted passwords. That master.passwd file is called the shadow password file because it shadows the other, nonsensitive information contained in the /etc/passwd file. Only the root user can read the shadow password file. Nonprivileged users can use the regular passwd file to discover other information, such as a user’s full name or home directory.

The /etc/passwd and /etc/master.passwd files are consulted only while the system is in single-user mode, or if the system has been reconfigured to use BSD Configuration Files (see Section 3.3, earlier in this chapter). To add a normal user to your system, you should use System Preferences Accounts. However, if you want to bulk-load NetInfo with many users or create a user while logged in over ssh, you can use nicl or niload.

You can list all users with the nireport utility. Supply the NetInfo domain (., the local domain), the directory (/users), and the properties you want to inspect (uid, name, home, realname, and shell):

% nireport . /users uid name home realname shell
-2      nobody  /dev/null           Unprivileged User       /dev/null
0       root    /var/root           System Administrator    /bin/tcsh
1       daemon  /var/root           System Services         /dev/null
99      unknown /dev/null           Unknown User            /dev/null
70      www     /Library/WebServer  World Wide Web Server   /dev/null
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X For Unix Geeks, 4th Edition

Mac OS X For Unix Geeks, 4th Edition

Ernest E. Rothman, Rich Rosen, Brian Jepson
Mac OS X Hacks

Mac OS X Hacks

Kevin Hemenway, Rael Dornfest
Mac OS X in a Nutshell

Mac OS X in a Nutshell

Jason McIntosh, Chuck Toporek, Chris Stone

Publisher Resources

ISBN: 0596003560Errata Page