[Ilugc] adding multiple user accounts with password

  • From: praveen@xxxxxxxxxxx (Praveen)
  • Date: Mon Jul 12 10:22:30 2004

Sridhar R wrote:

I want to add enourmous amount of users with specified passwords
automatically with script.  But the problem is `passwd` command
doesn't accept passwords from non-stdin stream and `adduser` command
requires encrypte version of password if at all passed is needed to be
given.

$ useradd foo -p `openssl passwd -1 bar`

Adding user 'foo' with password 'bar'


Other related posts: