Im trying to add many users to a system post kickstart for a disaster recovery plan. I wrote the following script, but for some reason some of the users passwords come out incorrect. I think this is due to weird chars in their password such as & or ! etc. Most come out just fine i would say 90% of the aprox 200 users i add and change their password to. I would greatly appreciate any and all comments and help in this matter. Perhaps there is a program allready out there thats "better" then my script that would allow for any chars in the persons password etc. Thanks!
#!/bin/sh # echo test for a in `cat users.txt` do { u=(`echo $a | cut -f 1 -d ':'`); p=(`echo $a | cut -f 2 -d ':'`); echo "User : "$u echo "Password: "$p adduser -s "/bin/false" $u } done cat users.txt | /usr/sbin/chpasswd The users.txt file would look like this jim:jimspassword joe:joespassword jeff:jeff'spassword Jim. _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list