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

Re: preconfiguration on the user side and its maintenance

On fre, 2004-10-08 at 23:22, Ralf Gesel|ensetter wrote:
> Hi Harald
> Am Donnerstag, 7. Oktober 2004 19:19 schrieb Harald Thingelstad:
> > I've made a script for this use, now GPLed and shared at
> > http://developer.skolelinux.no/~harald/createhomedir.pl
> Thank you for sharing, may I ask, to what extend your script is related 
> to  /usr/share/webmin/ldap-users/createhomedir  on tjener? This is the 
> place where _now_ user specific setting can be set. Alas, usable 
> variables are not well documented, Petter seems to be its author, 
> anyway.

No relation as I know of.

/usr/share/webmin/ldap-users/createhomedir copies /etc/skel to a users
homedir, and adds the subdirs priv and pub.

The script I made identifies a user to copy from, a normal user made
with wlus and a homedir in home0 etc (lets call her skeluser), and a
number of users to copy from.
It goes through each user and removes its whole homedir, including its
root, then copies the whole file tree from skeluser, with root dir,
permissions and all. 
Then, it replaces uid and gid for all files. All files recognized as
text files are searched through, and any string identical to skelusers
uid (loginname) or fullname is replaced with the users ditto.

Pretty dumb approach, but universal. It does what I want it to, and
that's enough for me. It replaces usernames, it copies file permissions,
it lets you have pretty much the setup you want.

If anyone wants to make something better, then do it. 
It's just, something like this has been requested for a pretty long time
now, and nothing's happened, so this is a first approach.


Reply to: