Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
the -p option is supposed not supposed to take the password as the argument, but the crypt of the password. There are commandline programs that can return this, but it is probably better just to set it after adding the user.
Eg as root
Code:
useradd arjun
passwd arjun
Also, depending on what distro this is you may have the higher level tool, adduser, which you may find more user friendly.
the -p option is supposed not supposed to take the password as the argument, but the crypt of the password. There are commandline programs that can return this, but it is probably better just to set it after adding the user.
Eg as root
Code:
useradd arjun
passwd arjun
Also, depending on what distro this is you may have the higher level tool, adduser, which you may find more user friendly.
Evo2.
Thanks, worked successfully
Quote:
Originally Posted by SIG_SEGV
I think this procedure works better...
#adduser Arjun
#passwd Arjun
because -p option isn't recommended actually... refer 'man useradd'
useradd: group 'log' does not exist
useradd: group 'optical' does not exist
useradd: group 'power' does not exist
useradd: group 'storage' does not exist
useradd: group 'wheel' does not exist
zsh: exit 6 useradd -m -g users -G -s /bin/bash Arjun
Can you tell me what we are doing in this command ?
Thanks
Quote:
Originally Posted by chrism01
Another option is
Code:
echo plaintextpasswd | passwd --stdin username
This will encrypt the passwd as well as set it; handy for bulk processing
useradd: group 'log' does not exist
useradd: group 'optical' does not exist
useradd: group 'power' does not exist
useradd: group 'storage' does not exist
useradd: group 'wheel' does not exist
zsh: exit 6 useradd -m -g users -G -s /bin/bash Arjun
Can you tell me what we are doing in this command ?
Obviously the groups you want to add a user to must exist on the system. Presumably, TroN-0074 was simply giving an example of how to add a user to multiple groups when running useradd.
Quote:
Giving error on executing this command
Code:
echo toor | passwd --stdin Arjun
Error:
Code:
passwd: unrecognized option '--stdin'
Different systems may use different versions or implementations of a given program, so you should check the man page on your system to see which options are supported. On my system, the man page doesn't mention a "--stdin" option, so I wouldn't try it there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.