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

Re: [K12OSN] scripting guru's, quotas challenge

Barry Cisna wrote:
Hi Brain,

Thanks for the tip. Unfortunately,I do not quite understand how you
incorporated this? I assume you mean bulk adding via an ldap bulk add
script? Can you give a process:
4.__ This is what it should look like with an successful add.
I am dumb I guess...:)


K12OSN mailing list
K12OSN redhat com
For more info see <http://www.k12os.org>
No problem, I'm using an old bulk script,it version v 1.15

First I created a user & set the quota's I wanted called idealstudent

then I added some lines to the script, right at the start I added this

my $idealquota = "idealstudent";

Then at about line 223 I added the line below with the edquota bit in, I've included the whole section but it's the line my $rc2 that you're interested in.

# Add the user
my $rc = system("/usr/sbin/smbldap-useradd -a -m -g $gid -c \"$first $last\" -s $shell -d $home $uname");
 if ($rc == 0) {
 # the user was successfully added
   my $rc2 = system("/usr/sbin/edquota -p $idealquota $uname");
   print OUTPUT "$first,$last,$uname,$gid,$shell,$home,$password,$slip\n";
   if (!defined($opt_i) and defined($opt_o)) {
print STDOUT "$first,$last,$uname,$gid,$shell,$home,$password,$slip\n";

I think the newer bulk add scripts have this in already as when I first did this way back when I send it to the list & the script guru's said they were going to add it so it might be worth looked through to see if it's there.

Hope this help

   The views expressed here are my own and not necessarily

the views of Portsmouth College
[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]