Hi Dears,
I have one script to create new users with information in one plain text file. This script will read all lines in the file and create one users for one line.
Sample file:
#action;login,full name title,expire date,project
+;gmwen,Bruce Wen QA,04/01/2012,BT
+;xxdeng,Shown Deng DEV,04/01/2012,BT
+;thli,Angela Li QA,04/01/2012,BT
+;xinhuang3,Jason Huang DEV,04/01/2012,BT
+ means to create.
After executing useradd command, I will set password for user with passwd command. Normally, it should prompt for password twice. But my script does not give me chance to enter password and just print below error to me:
HTML Code:
Changing password for user gmwen.
New UNIX password: BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password: Sorry, passwords do not match.
New UNIX password: BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password: New UNIX password: passwd: Authentication information cannot be recovered
In addition, subsequent users cannot be created because the script exits due to above error.
Bash version:
GNU bash, version 3.2.25(1)-release-(x86_64-redhat-linux-gnu)
on Red Hat 5.4
However, for bash version
GNU bash, version 3.00.16(1)-release-(sparc-sun-solaris2.10)
, it works well on Solaris OS.
Anybody can help me out of this trouble? Thanks!