Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Sep 2005
using the crypt command in my script
The script I'm doing right now requires me to automatically add in users based on information provided from a text file including userid, user id number, groups(multiple) . This part is no problem. thanks to the fine help I've received here, that I can do without problem. However, another thing that needs to be done for this script is to add an encrypted password based on the password provided in the text file. This is my snag.
Here is my script thus far:
#!/bin/bash cat inputfile.txt | while read usrname name uid pass groups do useradd $usrname -c $name -m -G $groups -u $uid done exit 0