lists.arthurdejong.org
RSS feed

Can't retrieve specific users/groups

[Date Prev][Date Next] [Thread Prev][Thread Next]

Can't retrieve specific users/groups



Hi all,

I've configured nslcd on Ubuntu Trusty to auth against OpenLDAP.

When I use 'getent passwd' and grep for a particular user, or use
'getent group' and grep for a particular group, the user/group I expect
appears, but when I 'getent passwd username' or 'getent group
groupname', I get no results back.

Can you please take a stab at what I'm doing wrong?

Command output below:

cyber@berry:~$ sudo ldapsearch -xLLL -D 
uid=cybertest,ou=Users,dc=office,dc=local -W uid=cybertest
Enter LDAP Password:
dn: uid=cybertest,ou=Users,dc=office,dc=local
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
objectClass: sambaSamAccount
objectClass: inetLocalMailRecipient
cn: Cyber Test
sn: Test
givenName: Cyber
uid: cybertest
uidNumber: 30109
gidNumber: 513
homeDirectory: /home/cybertest
loginShell: /bin/bash
gecos: System User
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
displayName: Cyber Test
sambaSID: S-1-5-21-2839130971-1555093197-1427382604-61218
sambaPrimaryGroupSID: S-1-5-21-2839130971-1555093197-1427382604-513
mailLocalAddress: cybertest
mail: cybertest@insightsrc.com.au
sambaAcctFlags: [U]
sambaNTPassword: D9F2B637956BECD7DFEFDCD0ECE3BE4D
sambaPwdLastSet: 1259642957
sambaPwdMustChange: 1263530957
shadowLastChange: 15069
sambaLMPassword: 3285763773100181FF17365FAF1FFE89
userPassword:: e1NTSEF9ZGMwSm00NWdTaloxWUxMdWJsWksvL1dBdkJKcVRHeFg=

cyber@berry:~$ sudo ldapsearch -xLLL -D 
uid=cybertest,ou=Users,dc=office,dc=local -W cn='Domain Users'
Enter LDAP Password:
dn: cn=Domain Users,ou=Groups,dc=office,dc=local
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 513
cn: Domain Users
description: Netbios Domain Users
sambaSID: S-1-5-21-2839130971-1555093197-1427382604-513
sambaGroupType: 2
displayName: Domain Users

cyber@berry:~$ getent passwd | grep cybertest
cybertest:x:30109:513:System User:/home/cybertest:/bin/bash
cyber@berry:~$ getent group | grep Domain\ Users
Domain Users:*:513:
cyber@berry:~$ getent passwd cybertest
cyber@berry:~$ getent group Domain\ Users
cyber@berry:~$ sudo grep -Ev "^[[:space:]]*(#|$)" /etc/nslcd.conf
uid nslcd
gid nslcd
uri ldap://127.0.0.1
base dc=office,dc=local
cyber@berry:~$ grep -Ev "^[[:space:]]*(#|$)" /etc/nsswitch.conf
passwd:         compat ldap
group:          compat ldap
shadow:         compat ldap
hosts:          files dns
networks:       files
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netgroup:       nis

-- 
Regards,
Matthew Cengia
-- 
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-users/