Quote:
Originally Posted by leebrent
I have the shawdow and passwd files here in my backup. So I can just append the lines for the regular users to the end of the existing files and that will be that?
|
I ended up using this script, thanks to your information. I was able to build it:
#This is only useful if authenication takes place from an external source like LDAP, and the user does not have a password stored on the local machine.
ls -la /home > USERS
cat USERS | awk '{print "groupadd -g", $4, $9}' > part1.sh
cat USERS | awk '{print "useradd -u", $3, $9, "-g", $9 }' >> part1.sh
chmod 775 part1.sh
echo "Now go check Part1.sh, and remove any bad users"
echo "."
echo "Once checked, then run ./part1.sh"