November 2005
Beginner to intermediate
528 pages
24h 11m
English
To create a user with dscl, you’ll need to create a directory under /users, and set the uid, gid, shell, realname, and home properties.
The following commands will create the same user shown in the previous section:
$sudo dscl . create /users/rothman uid 701$sudo dscl . create /users/rothman gid 701$sudo dscl . create /users/rothman shell /bin/bash$sudo dscl . create /users/rothman home /Users/rothman$sudo dscl . create /users/rothman realname "Ernest Rothman"$sudo dscl . create /users/rothman passwd \*$sudo dscl . create /groups/rothman gid 701$sudo dscl . create /groups/rothman passwd \*
Be sure to quote or escape the asterisk (*) in the passwd entries. After you create the user, you should set the password as shown in the previous section.
Read now
Unlock full access