You could write a simple tcsh (csh) script:
------------------------------------------------------------------------
#!/bin/tcsh
# assume username and passwords in seperate files
set usernames=`cat usernamefile`
set passwords=`cat passwordsfile`
set passwdindex=0
foreach user ($usernames)
# add the first user
/usr/sbin/useradd $user -p ${passwords[$passwdindex]}
# increment the index
@ passwdindex = ($passwdindex + 1)
end
------------------------------------------------------------------------
that should do it. If the username/passwords are in the same file, then adjust
the beginning to the known file format.
I thought useradd took unencrypted passwords by default. Are you logged in as
root?
Don Harrop wrote:
> I've got a ton of users to add on a particular linux box. I have all the
> usernames and passwords.. I'd like to create an executable file that will
> run useradd and insert everyone into the machine. I can't figure out how to
> make useradd take unencrypted passwords at the command prompt though. Any
> ideas?
>
> Don
>
> _______________________________________________
> Plug-discuss mailing list - Plug-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
--
-
============================
Tim M. Sanders
MontaVista Software
2141 E. Broadway Rd,. Suite 108
Tempe, AZ 85282
http://www.mvista.com
tsanders@mvista.com
(480) 517-5032 (office)
(480) 221-3472 (cell)