Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 1999 09:23:53 -0400
From:      OCD Support <support@kawartha.com>
To:        freebsd-isp@freebsd.org, cygone@zoomnet.net
Subject:   Script For Adding Many Users
Message-ID:  <374169E9.A88CA4A3@kawartha.com>

next in thread | raw e-mail | index | archive | help
As a few of you were asking about my script, here it is... There is NO
warranty of any kind on this script but as many of you will realize
there isn't that much to it...:)

open(input,"userlist");
while (<input>) {
($username,$password)=split(' ',$_,9999);
system ("echo $password | pw useradd $username -h 0 -g users -s
/bin/date");
}
close(input);


This will add users from a file that looks like this (filename is
userlist):

username    password
username2    password2
username3    password3

The user will belong to a group called users (-g) and a shell of
/bin/date (-s)

Please test this script before using to make sure it works on your
system... I'm not liable for trashed password files etc...:)  It works
fine on our systems here and we use it every few months.  We also use a
Linux based version for some older machines there.....

Thanks,

Paul




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?374169E9.A88CA4A3>