[Date Prev][Date Next] [Chronological] [Thread] [Top]

useradd, groupadd, usermod....



I'm about to start messing with useradd, usermod, userdel and their
group siblings and just wanted to see what's already out there.

I have a debian system using pam_ldap and nss_ldap.  I'd like to keep
using adduser so that I don't have to worry about breaking debian
specific stuff.  In the future, I'd also like to intercept only the
operations of useradd that are required (e.g. actual account creation, but
not necessarily home dir creation) so that I don't break any dist or
OS specific stuff OR have to rewrite it.

I know adduser can use adduser.local, but that's after account and
group creation through useradd and groupadd wich directly modify the
/etc files, so that won't do.

So I think I'm gonna start with a script to replace useradd and
possibly a seperate adduser.local script.  But before I started such a
thing, I was wondering if anyone has been doing any work on such a
thing.

The ultimate goal would be to patch useradd such that it checks for
the presence of a file and if it exists runs it much like
adduser.local.  I know debian's adduser creates the home directories
itself rather than using useradd's capability, but the patched useradd
should accept a return value from useradd.local that can tell it if it
should go on to do anything else such as create the home dir.

So I guess I'm asking if anyone is working on such a thing or a better
thing or if anyone sees any problems with this approach?

Ross Patterson
Programmer/Analyst
831-459-2792
rossp@ucsc.edu
1156 High St, Barn G, PP&C
Santa Cruz, CA 95064