2

I need to set up a large number of local user accounts on a number of machines running Ubuntu, and I need a way to script the password setting. These machines use /etc/shadow, as is the default in the installation. passwd doesn't take a password as argument, and usermod wants the password in encrypted form.

The best way I have found is to write a separate C program to use crypt to encrypt the passwords, and then use usermod to set them in /etc/shadow.

But is there some other way I can script password setting like this, that at least doesn't require me to do parts of it in C? It seems to me there must be some command I don't know about?

1 Answer 1

2

man newusers

read this and this

1
  • Ah, so there was a command for this that I didn't know about. Thanks! Sep 27, 2009 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .