Change Distinguished Name Format in OpenLDAP

I have the following problem: I installed the OpenLDAP server, in which the distinguished name in the people / users tree has the following format:

Distinguished Name: cn=Luigi Rossi,ou=people,dc=prisma,dc=local

The problem is that I want to replace it using uid (aka account username) instead of CN to have something like this

Distinguished Name: uid=lrossi,ou=people,dc=prisma,dc=local

I need this because I am setting up ldap authentication for Alfresco Community 4.0.d and it needs a username

ldap.authentication.userNameFormat=uid=%s,ou=people,dc=prisma,dc=local

Any help?

+3
source share
4 answers

, . . phpldapadmin , posixAccount. <rdn></rdn>. cn uid . DN "uid =% s, dc = example, dc = com" "cn =% s, dc = example, dc = com"

http://phpldapadmin.sourceforge.net/wiki/index.php/Templates#Template_Header_Configuration

+6

modify DN LDAP ( OpenLDAP ldapmodify):

uid:

ldapmodify -h host -p port -D bind-dn -w password <<!
dn: cn=Luigi Rossi,ou=people,dc=prisma,dc=local
changetype: modify
add: uid
uid: lrossi
!

ldapmodify -h host -p port -D bind-dn -w password <<!
dn: cn=Luigi Rossi,ou=people,dc=prisma,dc=local
changetype: moddn
newrdn: uid=lrossi,ou=people,dc=prisma,dc=local
deleteoldrdn: 1
!

.

+4

( ) phpLDAPadmin:

  • , .
  • : cn = Luigi Rossi
  • "Distinguished Name: cn = Luigi Rossi, ou = people, dc = prisma, dc = local"
  • "" 4
  • "cn = Luigi Rossi" "uid = lrossi"
  • .
0

ldapmodrdn, , , Debian ldap-utils. , CN DN, - CN RDN. , , .

DN.

0

All Articles