0
votes

LDAP side: I have associated users to groups with gidNumber. Example for group and users as part of my ldif file:

dn: cn=jenkins-administrators,ou=Groups,dc=example,dc=com
objectClass: posixGroup
cn: jenkins-administrators
gidNumber: 5000

dn: cn=jenkins-users,ou=Groups,dc=example,dc=com
objectClass: posixGroup
cn: jenkins-users
gidNumber: 5001

dn: uid=dude-user1,ou=Employee,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: dude-user1
sn: Dude
givenName: Dude
cn: Dude dude
displayName: Dude dude
uidNumber: 1000
gidNumber: 5000
userPassword: 123456
loginShell: /bin/bash
homeDirectory: /home/dude-user1
mail: [email protected]

dn: uid=dude-user2,ou=Employee,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: dude-user2
sn: Dude2
givenName: Dude2
cn: Dude2 dude2
displayName: Dude2 dude2
uidNumber: 1001
gidNumber: 5001
userPassword: 123456
loginShell: /bin/bash
homeDirectory: /home/dude-user2
mail: [email protected]
enter code here

Jenkins side: I have installed LDAP plugin and configured ldap Security Realm:

enter image description here

But when I run Test LDAP settings it shows that the user belong to two groups:

enter image description here

I expect to see only one group assosiate with the user.

any Idea what I do wrong? I really whant to keep ldif file as is.

Thanks

1

1 Answers

0
votes

I mixed things more than I should.

just need to add memberUid: user.name to the groups in LDIF file. Once doing so, no need to config Group search filter and Group membership