create home directories after create users

This might sound like a silly idea, but if the users aren’t actually doing anything, you could do: cat /etc/passwd | cut -f 1 -d : >/tmp/users.list Then edit /tmp/users.list to only contain the users you want. Then do: for i in `cat /tmp/users.list` do userdel $i useradd -m $i done However, many Redhat based … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)