I don't know why getent don't show my recently LDAP user addition.
-
ldif file:
dn: uid=user1,ou=People,dc=example,dc=com
uid: user1
cn: user1
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {SSHA}8t8W2kC48FN0QvwQk8JMRP/OQPI75sjP
shadowLastChange: 16444
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1005
gidNumber: 1005
homeDirectory: /var/www/html -
ldapadd:
ldapadd -x -W -D 'cn=Manager,dc=example,dc=com' -h 127.0.0.1 -f user1.ldif
-
ldapsearch work and shows user1
-
getent passwd
don't show my new user.
Anyone knows what's the problem? I'm sure is not much complicated but I don't find the solution.
Best Answer
Following the guide lines of @sven (thank you so much!) I've solved my question and I post the answer for it helps somebody.
First of all, I've checked id
getent passwd
was showing LDAP users or only local users. In my case, it shows only local users.Second install if you don't have it,
authconfig
:yum -y install authconfig
Write the following command to enable it:
Console write in my case:
Then configure start on boot like this:
Start service:
service nslcd start
orsystemctl start nslcd.service
Try getent:
Console write the LDAP user:
I hope that it is well.