Mac OS X Adding a User From the Command Line
Create a new entry in the local (
/) domain under the category/users.niutil -create / /users/usernameCreate and set the shell property to
bash.niutil -createprop / /users/username shell /bin/bashCreate and set the user’s full name.
niutil -createprop / /users/username realname "User Name"Create and set the user’s ID.
niutil -createprop / /users/username uid 503Create and set the user’s global ID property.
niutil -createprop / /users/username gid 1000Create and set the user name on the local domain, as opposed to the network domain or another domain.
niutil -createprop / /users/username home /Local/Users/usernameMake an entry for the password.
niutil -createprop / /users/username _shadow_passwdSet the password.
passwd usernameTo make that user useful, you might want to add them to the admin group.
niutil -appendprop / /groups/admin users username

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home