Is there any way to add, remove, or modify user accounts via the command line? I'm not talking about an account for a system process or daemon, I mean is there any way to add a user account, change, user real names, icons, File Vault protection, Admin/normal/limited user status, and basically do everything else that can be done in the System Preferences Users preference pane, but via some command line utility?
Tell me more
×
Ask Different is a question and answer site for
power users of Apple hardware and software. It's 100% free, no registration required.
|
To create an account in the Users folder
Create and set the shell property to bash.
Create and set the user’s full name. (Displayed in some of the panels/login screen)
Create and set the user’s ID. (this is the unique id, you need to find out what id your last user create was and add one)
Create and set the user’s group ID property. (This can be your default group)
Create and set the user home directory.
Set the password. (dont use password as a password)
Some more details can be found on OsX Daily |
|||||||
|
|
Solution by @Infamy seems to be for 10.5. On OS X 10.6 each line needs to be changed to look like the following:
That is, replace |
|||||
|
dscl? Maybe? A starting point for looking, I've never tried it myself. You'll note that your user account is completely absent from /etc/passwd. You might have luck looking at the OSX Server docs. – Jason Salaz♦ Dec 10 '10 at 19:10