[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Adding Mass Users Revisited



ok I have searched the archives and found 2 different scripts, one of
which adds the users, but does not add them to the gui, and one that adds
the users to the gui but does not add them with frontpage extensions and
the /~username.

Does anyone have, or know of a script that will do all of the above?

the scripts that I have found are the one at
http://list.cobalt.com/pipermail/cobalt-developers/2001-May/032353.html
which does not add to the gui, running the script as root.

and this little one I found on the archives:

#!/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 = 10;       # Disk quota in MB
my $fpx = "on";     # 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");
}

any help would be appreciated, as I have 629 users that I desperatley need
to migrate to this raq 4 and I an reluctant to hand add them.

also is there any way around the 12 character max usernames and the 3
character minumum passwords?

David