[K12OSN] Re: Customised smbldap-useradd-bulk script (quite long)

Brian Chivers brian at portsmouth-college.ac.uk
Sun Feb 6 10:45:40 UTC 2005

----- Original Message ----- 
From: "Matt Oquist" <moquist-k12osn at majen.net>
To: <k12osn at redhat.com>
Sent: Friday, February 04, 2005 4:42 PM
Subject: [K12OSN] Re: Customised smbldap-useradd-bulk script (quite long)

> > From: "Brian Chivers" <brian at portsmouth-college.ac.uk>
> > Subject: [K12OSN] Customised smbldap-useradd-bulk script (quite long)
> > I've been looking at the smbldap-useradd-bulk script for the creation
> > ofusers and it almost fits the bill except for one thing, we use a
> > differenthome directories depending of what tutor group the student is
> > So forexample we have
> >
> > /home_student/tutorgroups/101/e000000
> >
> > where e000000 is the students unique enrollment number.
> >
> > I've altered the bulk script to read a userinfo.start file that looks
> > this
> >
> >
> >
> >
> >
> > and the resulting username.finish looks like this
> >
> >     #################################
> >     Fri Feb 4 15:19:00 2005
> >
> >     firstname,surname,username3,513,coo22gra
> >     firstname,surname,username4,513,get25hoi
> >     firstname,surname,username5,513,naw44not
> >
> > This allows me to specify the users default shell (which is different to
> > staff users) and home directory
> Good idea, Brian.  I didn't think of letting folks customize their
> users' home directories or shells, and the script should make those
> possible -- but not required.
> I think you modified the script correctly, but we should try to figure
> out what the best way to handle this problem is.  That is, it would be
> best to have one version of the script that is consistently updated
> rather than multiple versions that need to be kept in sync, and we
> need to make that One Version ("to rule them all...") work as well as
> possible for as many people as possible - including folks who want to
> specify alternate shells and custom home directory schemes.
> I propose that we add two new fields to the input to
> smbldap-useradd-bulk: "home" and "shell".
> Input would look like this:
> >     firstname,surname,username,[GID,shell,home-directory,password]
> Note that the last four fields are [optional], and any of them can be
> specified apart from the others as long as a blank is left for any
> internal field.
> For example, the following specifies a shell but no GID:
> >     firstname,surname,username,,shell
> And here, a password but no other optional field:
> >     firstname,surname,username,,,,password
> Output from the script would look like this:
> >     firstname,surname,username3,GID,shell,home-directory,password
> So for you, Brian, an example input line would look like this:
> firstname,surname,username,GID,/bin/false,/home_students/tutorgroup/101/
> I think this is reasonable because by the time you've got students
> divided into tutoring groups, you've got to enter the data one way or
> another.  If we simply add generic fields such as "home" and "shell"
> to the smbldap-useradd-bulk script, you can create those home
> directory paths in your input with your custom information, rather
> than forcing everyone who uses smbldap-useradd-bulk to have a "tutor"
> field, which almost no one else will use.
> The combination of create-usernames and smbldap-useradd-bulk (and the
> 'make' command) will continue to work fine after these changes.
> Please let me know if anyone has any objections to these changes being
> made.  Assuming this works for everyone, I'll plan to make these
> changes to smbldap-useradd-bulk and release another version soon --
> hopefully this weekend.
> Maybe we can nail the roaming profiles problem simultaneously...?
> --matt
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>

Sounds good to me. I don't think there is much else in the smbldap-useradd
command options that users would want to alter.

I like the idea of having optional fields as people can always slightly
customise the "makefile" to alter the import to the standard.

I haven't come across the roaming prfiles issue yet as my sandbox machine
has only jusr reached the point of adding a Win2K client. I have roaming
profiles working on our existing Samba 2.2.3a server so I guess the next
task is to copy the profiles over and try to migrate the existing user
accounts (see next post *grin*)

Thanks for the swift reply.


    The views expressed here are my own and not necessarily 
                the views of Portsmouth College             

More information about the K12OSN mailing list