TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:8052] Multiple /etc/skel entries?



On Thu, 2 Sep 1999, Ben Beuchler wrote:

> Is it possible to have default 'adduser' settings that are different for
> different groups?  Specifically, I would like to have two groups: 'ftp' and
> 'users.'  The 'ftp' group would need to have an /etc/skel folder that
> contained the normal bin, lib, etc entries for a guest ftp account that is
> going to be 'chroot'-ed.  The 'users' account would need whatever default
> configuration files they need for KDE or bash, etc...
> 
> Currently, I have to pick one as the default and manually make the changes
> for anyone from the other group.  I suppose I could set up a series of
> scripts to handle the manual changes for me, but it would be so muc more
> elegant to have different defaults for each group!

Create a new skel for your group. Then tweak your 'adduser' script to
point to the new skel, and name it 'adduser-ftpgroup' or something. I'm
not near a Linux system, but on my FreeBSD system here, 'adduser' is a
Perl script. You should be able to make this small fix with no knowledge
of Perl or *sh (or whatever other scripting language 'adduser' might be
in).

And now you know why 'adduser' is written in an interpreted scripting 
language on every Unix system in the world. :)


-- Chris

  Christopher Reid Palmer : http://www.innerFireWorks.com/