Reputation: 55
I am trying to create linux users using a script . The username and corresponding password are stored in a config file.
config file is given below
username="user1"
password="passxxx"
using a shell script i am creating linux users with username and password provided in config file.
if [ -n "$username" ] then
password="$line"
sudo adduser $username
sudo passwd $username
Here i have to give the password in the config file. usually we have to type the required password twice to update the password information . Is there any way to update the password without typing ( use the password provided in config file) .
Upvotes: 1
Views: 2722