Adding new users the easy way - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html) +---- Forum: Users and Groups (https://www.linux-noob.com/forums/forum-32.html) +---- Thread: Adding new users the easy way (/thread-1515.html) |
Adding new users the easy way - Dean Plude - 2007-03-20 So far the easiest way to add users is in a terminal and use the useradd -m login name then to set the password you use the passwd login name Adding new users the easy way - znx - 2007-03-20 Yeah .. its the easy method by far :) Code: # useradd -d /home/$1 -m -k /etc/skel -g users -G audio,video -s /bin/bash $1 That's what I use, please note this isn't perfect for all systems, some might not have the groups I add. Also when I'm setting up accounts (multiple) I normally use the -p option to allow me to set a default password. Code: # crypt.pl somewonderfulpassword The crypt.pl is a nice simple bit of perl: Code: #!/usr/bin/perl -l ;) Adding new users the easy way - Dean Plude - 2007-03-21 Great tip, will use :) Adding new users the easy way - xDamox - 2007-03-21 Yo znx, Nice tips, however don't you think: # crypt.pl somewonderfulpassword is abit insecure as this will be logged in the .bash_histroy if your using bash? Adding new users the easy way - znx - 2007-03-21 Well what I did there was an example, normally I do all that from a script, where $1 is the input ... Code: # useradd -p `crypt.pl $1` .... $1 So simply setup an account with user/pass the same .. :)Also if you are doing this as root (which I'd assume you are) then you would be in control of the account as it was and able to reset the password to anything you wanted! eheh Adding new users the easy way - xDamox - 2007-03-21 :) |