bash scripting
can someone tell me what i'm doing wring? i get an error: "line 35: syntax error: unexpected end of file"
Code:
#!/bin/bash thanks a bunch, chris |
You could try #!/bin/bash -x so you can see what's happening.
This method of adding a user and password does seem to work but, I use a slightly different method. Code:
adduser $name<<PASS Code:
adduser ${NAME} -g ${NAME} Code:
#!/bin/bash |
next time don't add whtie spaces to your "<<PASS ... PASS"
this should fix it: Code:
#!/bin/bash |
one more thing i kinda doubt this will work:
Code:
adduser $name<<PASS Code:
echo -e "$pass1\n$pass2" | adduser $name |
this is kind of stupid
Code:
adduser $name<<PASS Code:
echo password should be Code:
adduser $name<<PASS |
Code:
groupadd ${NAME} 2> /dev/null ##Change this if user needs a different group Code:
groupadd ${NAME} 2> /dev/null ##Change this if user needs a different group |
Nice tip fotoguy!
Actually Fedora automatically creates the /home/username folder, grabs input from /etc/skel and adds the user to a group of same name as user. So, I guess it could be cut down more for my FC5 boxen. Code:
useradd ${NAME} |
Quote:
|
All times are GMT -5. The time now is 11:06 PM. |