OpenSUSE Users Password Useradd – How to Create a User with Given Password on SuSE from Command Line

opensusepassworduseraddusers

I need to create bunch of new users with given password. What I want is a script that I would pass the user name of new user and it will create/add the user and set its password. (the password is the same for all new users – no security issues here.)

Any suggestions how to do that on SuSE from command line?

Best Answer

Does SuSE useradd have the -p option? That takes the password (albeit in encrypted form, but you should be able to generate that I think).

So useradd -p <crypt'ed password> <new username> should do it I think

Related Question