I have written a script for adding and setting password for 100+ users. Eg: for setting password of the user I want to set in "user+123" format for all the users I.e user will change according to the username in password. How can I write a script for this.
#!/bin/bash
for i in `more users.txt`
do
useradd $i;
echo "User $i added successfully"
passwd $("$i"123)
echo "Password added successfully for user"
done