0

While configuring the LDAP authentication i faced the following problem.

I have configured the nss in nsswitch.conf file as follows:

passwd: ldap files

group: files

shadow: files

When i give the following command: getent passwd all the users including the local and the ldap users are listed:

getent passwd

usr_admin:x:1191:205:usr_admin:/home/usr_admin:/usr/bin/tcsh (LDAP user)

user_sec:x:1192:205:user_sec:/home/user_sec:/usr/bin/tcsh (LDAP user)

root:x:0:0:root:/root:/bin/bash (local user)

bin:x:1:1:bin:/bin:/bin/bash (local user)

However when i give the getent with a key:

getent passwd root

root:x:0:0:root:/root:/bin/bash

it works only for local users. Meaning that when i give a user_id of an ldap server, nothing is listed: getent passwd usr_admin

(nothing is listed here..)

Any suggestion why this happening?

Andreas Sk
  • 81
  • 2

3 Answers3

1

I managed to solve the issue. It was the nscd service that created the problem. by closing nscd or restarting it i am now able to rub getent passwd ldapuser correctly.

Andreas Sk
  • 81
  • 2
0

I have ldap server set on centos 7, and I could get "getent passwd lapduser" on the server and the client, but now I can only get it on the ldap client. I setup a second client has the same problem but ldapsearch works and returns the info for the user. Something is reset on the server configuration side!

kevbuntu
  • 461
  • 1
  • 12
  • 27
0

I've found what may be a similar issue on Solaris which may also apply here.

Check the following discrepancy:

abss70:etc$ getent group sysadmin
sysadmin::14:
abss70:etc$ getent group | grep ^sysadmin
sysadmin::14:
sysadmin::14:root,user1,user2
abss70:etc$

This broke a script that I was working on for a while. I doubt that there's a full listing in the example above, but there may be two root entries there too.

StuWhitby
  • 29
  • 4