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

adding/removing users from the database



I'm currently using openldap-1.2.9, pam_ldap-46 and nss_ldap-105 to authenticate
my users and that works fine.
I've made some scripts to add/remove users from the LDAP database, but they are
not the best thing I've ever made. I just add the user temporarily to the local
/etc/passwd with a plain adduser, take that entry out and use migrate_passwd.pl
and migrate_group.pl to add that to the database.

I could make some sort of LDIF template and add my users with that, but I don't
know how to generate some fields of the shadow entries, mainly shadowflags.
Useradd takes care of that for me, it also checks the UID and GID and makes new
correct ones (via glibc calls which get routed to the ldap server via nss_ldap, I
guess).
So, has anyone come up with these sorts of scripts? Or, how do you handle this
situation?
Thanks!


-- 
Andreas Hasenack