https://github.com/lldap/lldap logo
jeromecst - hello, I did manage to get my linux...
# troubleshooting
j
hello, I did manage to get my linux users sync with lldap on my systems, but I can't find a way to synchronize posix groups, did anybody managed to make this work? ldapsearch correctly returns group entries:
Copy code
# jerome, groups, xxxxxxxxxxxxxxxxx
dn: cn=jerome,ou=groups,dc=xxxxxxxxxxxx
objectclass: groupOfUniqueNames
uid: jerome
cn: jerome
member: uid=jerome,ou=people,dc=xxxxxxxx
uniquemember: uid=jerome,ou=people,dc=xxxxxxxx
entryuuid: 2ee08f30-f1a2-35ec-952e-9f31beca81e5
getent passwd corretly returns the user:
jerome:*:1000:1000:jerome:/home/jerome:/bin/bash
but getent group is always emtpy here's what I do in nslcd:
Copy code
txt
reconnect_invalidate passwd group
nss_initgroups_ignoreusers ALLLOCAL

pam_authz_search (&(unix-uid=*)(uid=$username)(memberOf=cn=xxxxx,ou=groups,xxxxxxxxxxxxx))

# The search scope.
#scope sub

filter passwd (&(objectClass=posixAccount)(unix-uid=*))
map     passwd uidNumber unix-uid
map     passwd gidNumber unix-gid
map     passwd gecos uid
map     passwd homeDirectory "/home/${uid}"
map     passwd loginShell    "/bin/bash"

filter group (&(objectClass=groupOfUniqueNames)(unix-gid=*))                                                                                                                                                   
map group gidNumber unix-gid                                                                                                                                                                                   
map group memberUid member                                                                                                                                                                                     
                                                                                                                                                                                                               
validnames /.*/i
a
message has been deleted
n
Stupid question , but your groups have unix-gid?
j
yes they do
n
Alright, then I don't know. You can have a look at the LLDAP (verbose) logs to see what were the queries and what groups were returned, but if they're correctly returned then I'll leave it to the pam experts
j
alright thanks anyway
I think I had a filter issue, now when I try to getent, I have this: error writing group entry: Invalid argument it only happens for the groups with at least 1 user my question is: are there mandatory fields in the user schema? because I only set uid & gid https://cdn.discordapp.com/attachments/1290320340492488808/1290333249456963614/image.png?ex=66fc13fb&is=66fac27b&hm=646c7fb302697bb1720b4b658926d4f6983e327fc54aae50a593af95bc44ec63&
n
@rkj would you know?
j
after testing it does work, I can add users to sudo and the command
groups
returns the rights groups for each users maybe a bug in getent or something missing? idk at least it works now
r
Are you running a build from the latest master branch? (at least as of 'this month')
There was a bug relative to how lldap handled certain types of group membership queries that got fixed... within the last 3 months, but not within the last month, I think.
For me, this prevented nslcd from getting my system groups right
j
I'm using the latest docker image, that I pulled on Friday
2 Views