Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
When you use the useradd command, supplying the password for it is in original text; It will be encrypted and added to /etc/shadow. You need to supply the actual password the user will be using, and not the encrypted hash.
With option "-p" in command useradd, you need to pass in encrypted password. If you use command passwd, then you may use plain text. Linux man page of useradd clearly says so.
I did try with plaintext as password with the command. In the /etc/shadow, the plaintext password is used as-is, not encrypted.
Try using single quotes rather than the double ones. I think what's happening is that the shell is trying to interpret $0 $1, and $7. It didn't find $1 and $7, and so leaves them out. It did find $0, the value of which is "bash".
Or you could try something without $ and /.
You're welcome.
Actually, I learned something too. I've been using useradd for years without ever realising that there was the option to set the password with it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.