Forum: Ruby on Rails ldap authentication and useradd

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2006-05-19 11:06
(Received via mailing list)
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
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2006-05-19 12:02
(Received via mailing list)
On 5/19/06, Martin DeMello <martindemello@gmail.com> 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
This topic is locked and can not be replied to.