[K12OSN] smbldap-useradd-bulk script & quota's (Brian Chivers)
Matt Oquist
moquist at majen.net
Thu Mar 10 14:19:16 UTC 2005
> From: "Brian Chivers" <brian at portsmouth-college.ac.uk>
> Subject: [K12OSN] smbldap-useradd-bulk script & quota's
> I've been looking through the smbldap-useradd-bulk script and trying to
> workout how to add quota limits. Currently we have a script that generates
> then copies the quota from a user called ideal_student using the command
>
> edquota -p ideal_student username
>
> Could someone tell me where in the script I'd have to add this, I was
> thinking just under the line where the users smbpasswd is set
Yeah, that looks right. Probably like this:
# Silently change the user's LDAP password
# (If we don't redirect stderr into /dev/null, smbldap-passwd
# complains.)
open PWD, "| smbldap-passwd $uname 2>/dev/null 1>&2";
print PWD "$password\n$password";
close PWD;
edquota -p $opt_q $uname
If you want to just hack this on your own system ATM, you can just put
"edquota -p ideal_student $uname" right there and it should work for
you. I put "$opt_q" there because this sounds like it should be an
additional option - how about "-q <ideal-student>"?
> Perhaps it could be added as an optional field to the file that the script
> reads ? but I have no idea how to do this.
Yeah, you're right. It should be an optional field in the input, but
there should also be a "-q" (or whatever, but I think 'q' makes sense)
option on the command line to allow a default ideal-user to be
specified.
I'm kinda swamped at the moment, but I can plan to get to this and
Dave's ACL work in a couple of weeks or so. If anybody needs this
urgently, try hacking it in as I mentioned above...
Good suggestion, Brian.
--matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/k12osn/attachments/20050310/41a0f476/attachment.sig>
More information about the K12OSN
mailing list