bash - Assigning password to users created from CSV -
The script function without error, but password does not work on accounts. Not sure why the password is not being appointed, any help will be awesome.
#! / Bin / bash OLDIFS = $ IFS IFS = "," while the first name is read userid do sudo useradd - "$$ {Firstname} $ {lastname} '" -d / home / "$ {userid}" -s / Bin / bash "$ {userid}" SUU UMMD-P ChangeMei 123 "$ {UserId}" Sudo Usermode - Student did "$ {userid}" & lt; Student.csv
I tested the following line instead of usermod -p
Need to see the piping in the void. This time the test could not be tested sudo bash -c should be
.
Comments
Post a Comment