Home » Questions » Computers [ Ask a new question ]

Is there a usermod equivalent in terminal for OS X 10.6.1

Is there a usermod equivalent in terminal for OS X 10.6.1

Can anyone tell me how to modify a user and add them to a group in terminal on SL (10.6.1)?

Asked by: Guest | Views: 189
Total answers/comments: 2
Guest [Entry]

dscl is the usual way to modify any stuff from Directory Services (whether local or remote) from the command line. See the dscl manpage for all the info (or the local one if you are not running 10.6). Google turns up many examples of how to use it (including many from macosxhints.com).
Guest [Entry]

"To add an example, this is how you can modify someones homedirectory:

dscl . -create /Users/postgres NFSHomeDirectory /opt/local/var/db/postgresql84

You can see also properties for an object using the read command:

dscl . -read /Users/postgres"