Tuesday, May 31, 2011

Oneliner script for user account & password creation in linux

You need to have root user privileges to run some of the commands in the script needs.

user=openuser;for i in {1..50};do useradd $user$i;pd=abc;echo $user$i$pd |passwd --stdin $user$i;done

This will create user names openuser1, 2 till 50 with password "openuser1abc, openuser2abc, etc.,"

1 comment:

electronics mini projects said...

Great retheesh, keep doing more and more...