[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-developers] add user script
- Subject: RE: [cobalt-developers] add user script
- From: "KAMRY" <kamry1888@xxxxxxxxx>
- Date: Thu Jun 21 15:51:00 2001
- List-id: Discussion Forum for developers on Cobalt Networks products <cobalt-developers.list.cobalt.com>
Does this update the pg too.
-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx]On Behalf Of Peter
Blaser
Sent: Friday, June 22, 2001 1:32 AM
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: Re: [cobalt-developers] add user script
on raq4
check /usr/sbin/cobalt
there exists all kind of scripts to add an delete virtual sites as well as
users
after my posting to the maillist I was searching further on and found this
to add useres to speific site I use a script like:
#!/usr/bin/perl
# pass a comma separated list of
#
# username,fullname,password,email
#
# the file which contains the users to be
my $addfile = 'users.dat';
# the site to which the useres should be added
my $sitename = "site1";
my $quota = 5; # Disk quota in MB
my $fpx = "off"; # Front Page Support
my $apop = "off"; # Apop support
my $admin = "off"; # User is admin or not
my $shell = "off"; # allow shell access
open IN, $addfile;
flock (IN,2);
@userdata = <IN>;
close IN;
foreach $usr (@userdata) {
chomp($usr);
($username, $fullname, $passwd, $email) = split(",",$usr);
print "Adding $username:$fullname:$passwd:$email\n";
system("/usr/sbin/cobalt/adduser -g $sitename -u $username -f
\"$fullname\" -p $passwd -e $email -q $quota");
}
Peter
_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com