Create users from a text file by script

Hi All,

I am new to scripting, i want to create one script in which i can add users from a text file, assign them a default password like 123456.
It should be like:

Username= $i (it should take users from text file one by one)
Password : 123456(default for every user)

Start by learning how to read a file using while loop and check the man pages for the commands useradd and passwd

--ahamed

1 Like