Hey guys in this simple post i will show you how you could easily create passwords of multiple users with a simple script.
!/bin/bash file=/user.txt for i inmore $file
do useradd $i newpass=mkpasswd
echo "user $i added successfully" echo "$newpass" | passwd --stdin "$i" echo "password for user $i is $newpass" done
Just create a file user.txt in / directory and add users to this file.
give executable permissions to the file and run by typing e.g
# sh file.sh
Thanks,
Salman A. Francis
https://youtube.com/linuxking
https://facebook.com/linuxking77
Insta: Linuxking77
Twitter: @Linuxking77