Hi.

Indeed it can. ^_^
Just for starters, if ur file is /somewhere/ismyfile.txt, u can do a simple Perl like this

#!/usr/bin/perl -w

open(NAMES, "/somewhere/ismyfile.txt") or die "Unable to open file: $!\n";
my @users=<NAMES>;
close NAMES;
foreach my $user (@users) {
   system("useradd $user");
}

seekuel wrote:

Greetings!

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? Because entering users one by one takes a lot of time. I am thinking that if the names are dump to a text file then
it can be read and entered by the system.

Thanks



------------------------------------------------------------------------

_________________________________________________
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



--
Glenn G. Remot
IT, Network Communications
Philippine Daily Inquirer
8977808 loc 351
http://atym4everything.blogspot.com

_________________________________________________
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

Reply via email to