Users don't appear in /etc/passwd on Mac OS X

The /etc/passwd file is only consulted when the OS is in single-user mode. The "standard" location for account information on OS X is the DirectoryService.

Try man DirectoryService for more information.

The following comment block appears at the top of my password file:

##
# User Database
# 
# Note that this file is consulted directly only when the system is running
# in single-user mode.  At other times this information is provided by
# Open Directory.
#
# This file will not be consulted for authentication unless the BSD local node
# is enabled via /Applications/Utilities/Directory Utility.app
# 
# See the DirectoryService(8) man page for additional information about
# Open Directory.
##

In recent versions of OS X Directory Utility has been moved to /System/Library/CoreServices/Directory Utility.


There is a set of Directory Services which keeps the information. There are a series of command line tools (dscl for one) to manipulate them (hard) or you can use System Preferences to handle some of them.


OS X doesn't use the UNIX/LINUX /etc/passwd files. Instead, it stores it in NetInfo. The command used to interact with NetInfo is the directory service command utility, or dscl.

I'm not familiar with the commands, but I'm sure a simple man dscl wouldn't hurt anyone.

Tags:

Unix

Macos