MAC OSX: Create a new user on the command line.

One common task that any system administrator will perform is to add a new user to a system or application. I recently had a need to add a new user to a MAC server over an SSH connection and found it much more difficult than it should have been. I ended up writing a script to perform the task.

The script located here will create a new user, add them to the admin and staff groups, make their primary group id staff (gid 20) and be sure their userid is the next available one, as well as creating the default home directory based on the English.lproj template.

Let me know how it works for you.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *