Ldap authentication and useradd


#1

we’re in the process of setting up an openldap server, for unified
unix and webapp authentication, and i’m trying to find a good
equivalent of adduser that takes care of generating unique unix
numerical uids. what are people using for this? [i’ve googled around and found http://prope.insa-lyon.fr/~ppollet/ldap/useradd.pl but it’s dated 2000]

martin


#2

On 5/19/06, Martin DeMello removed_email_address@domain.invalid wrote:

we’re in the process of setting up an openldap server, for unified
unix and webapp authentication, and i’m trying to find a good
equivalent of adduser that takes care of generating unique unix
numerical uids. what are people using for this? [i’ve googled around and found http://prope.insa-lyon.fr/~ppollet/ldap/useradd.pl but it’s dated 2000]

And then there’s

next_uid = ldapsearch -b ou=Users,ou=UsersCompanies,dc=atlantis,dc=com -h ldap-server -s one uidNumber.scan(/(?:uidNumber: )(\d+)/).flatten.map {|i| i.to_i}.max +
1

any problems with that approach?

martin