This is the format of the txt document:
-----
password username fullname
-----
Mga sir, I dont have an experience in scripting and deep programming. I think that this is a first step and I need you guys to help me. Is that ok? :)
So what can my first step be?
Thanks
On 5/26/06, Jonathan Doblados <[EMAIL PROTECTED]> wrote:
On 5/26/06, seekuel < [EMAIL PROTECTED]> wrote:I wanna ask if there is a better way in adding a user to linux box with its password and username from a text file?
You can do a script to do this. I tried this once with PHP, and had the following line in a loop:
useradd -d /home/mailusers/".$acct." -p '\$1\$pdHURzzz\$XJEFln7EZ.8WqXHo7quiG.' -s /bin/false ".$acct;
The characters following the -p switch is the account's crypt() encrypted password, which you can get from /etc/shadow. Don't forget to escape $ characters in the encrypted password.
HTH.
--
JONATHAN J DOBLADOS
http://trigger.cdo.linux.org.ph
"I can do all things through Christ, who strengthens me."
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

