How do I create user accounts from the Terminal in Mac OS X 10.5?

Use the dscl command. This example would create the user “luser”, like so: dscl . -create /Users/luser dscl . -create /Users/luser UserShell /bin/bash dscl . -create /Users/luser RealName “Lucius Q. User” dscl . -create /Users/luser UniqueID “1010” dscl . -create /Users/luser PrimaryGroupID 80 dscl . -create /Users/luser NFSHomeDirectory /Users/luser You can then use passwd to … Read more

How can I rename a Unix user?

Under Linux, the usermod command changes user names. It modifies the system account files to reflect the changes that are specified on the command line. To change just the username: usermod –login new_username old_username To change the username and home directory name: usermod –login new_username –move-home –home path_to_the_new_home_dir old_username You may also want to change … Read more

What’s the default superuser username/password for postgres after a new install?

CAUTION The answer about changing the UNIX password for “postgres” through “$ sudo passwd postgres” is not preferred, and can even be DANGEROUS! This is why: By default, the UNIX account “postgres” is locked, which means it cannot be logged in using a password. If you use “sudo passwd postgres”, the account is immediately unlocked. … Read more