[CentOS] help - batch account creation

Tue Aug 4 03:28:21 UTC 2009
Rajagopal Swaminathan <raju.rajsand at gmail.com>

Greetings,

On 8/3/09, David Leon <dleon741210 at gmail.com> wrote:
> Hello guys
>
> I have a new Centos 5.3 running, and I have a text file with a bunch
> of accounts (more than 100) that I should create
> .
> File format is like this
>
> user1 pasword1
> user2 passwrd2
> ....
>
> How can I do this task easier than creating user one by one by hand?
> Need some help for building an script to achieve this task
>
> Thanks
> David


I have used newusers command in conjunction with a text file in passwd
file type fields. man newusers should be your friend here

and if they are to be replicated across nodes as in a cluster, wrap it
up in a scrip with scp for /etc/passwd, /etc/group, /etc/shadow and
/etc/gshadow

HTH

Thanks and regards

Rajagopal