First create a file which contains all the user name. Something like this:
nurealam nayeem mrahman farid rubi sankarSave the file as userlist.txt. Now create the following bash file:
#!/bin/sh for i in `more userlist.txt ` do echo $i adduser $i doneSave the file and exit.
chmod 755 userlist.txtNow run the file:
./userlist.txtThis will add all the users to the system. Now we have to change the passwords. Let's say we want username123 as password. So for user nayeem the password will be nayeem123, rubi123 for user rubi and so on.
Create another bash file as follows:
#!/bin/sh for i in `more userlist.txt ` do echo $i echo $i"123" | passwd –-stdin "$i" echo; echo "User $username’s password changed!" doneRun the file. All the passwords are changed.