Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[root@host ~]# ldapsearch -nvx -H ldap://host1:389 -b ou=people,dc=test,dc=com
ldap_initialize( ldap://host1:389 )
filter: (objectclass=*)
requesting: All userApplication attributes
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=test,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
[root@host ~]# ldapsearch -nvx -H ldap://host1:389 -D uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot -W -b ou=people,dc=test,dc=com
ldap_initialize( ldap://host1:389 )
Enter LDAP Password:
filter: (objectclass=*)
requesting: All userApplication attributes
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=test,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
And, neither request returns data.
And this is the smaller problem. I have another host with the same /etc/ldap.conf and /etc/nsswitch.conf settings that won't return getent or ldapsearch.
Finally, running the ldapsearch on the ldap host, using "-h localhost" or "-H ldap://localhost" works fine.
Heh. Step 1: "yum install telnet" (These test hosts are supposed to mimic a secure environment... ;-)
Port 389 gets responses. Port 636 refuses connections. Which is consistent with my not bothering to set up ldap+tls.
I'm reasonably sure I'm missing a setting on the clients, somewhere. At least as far as getent is concerned. If I can get getent passwd working on this one host that will allow forward progress. Then, the ldapsearch weirdness becomes a back-burner item.
Also, on the RH Directory Server host, I can do ldapsearch with "-h localhost," "-h host1," and "-H ldap://host1.d.n:389" and get identical output for each test.
And a silly question: have you tried running your searches w/o the '-n'?
Okay, I knew I was an idiot. This new workstation is receiving good output for ldapsearch. Now that I've demonstrated that a connection to the ldap servers is functional, I have to figure out why getent won't show me the additional users.
Code:
[root@hmiwks04 ~]# ldapsearch -vx -H ldap://rhdirsrv1:389 -D uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot -W -b ou=people,dc=fed,dc=mtr | grep ^dn:
ldap_initialize( ldap://rhdirsrv1:389 )
Enter LDAP Password:
filter: (objectclass=*)
requesting: All userApplication attributes
dn: ou=People,dc=fed,dc=mtr
dn: cn=nsPwPolicyContainer,ou=People,dc=fed,dc=mtr
dn: uid=Joe,ou=People,dc=fed,dc=mtr
dn: uid=Karen,ou=People,dc=fed,dc=mtr
dn: uid=Laura,ou=People,dc=fed,dc=mtr
dn: uid=Sam,ou=People,dc=fed,dc=mtr
dn: uid=Tina,ou=People,dc=fed,dc=mtr
dn: uid=FordH,ou=People,dc=fed,dc=mtr
dn: uid=YoungS,ou=People,dc=fed,dc=mtr
dn: uid=HannahD,ou=People,dc=fed,dc=mtr
dn: uid=HauerR,ou=People,dc=fed,dc=mtr
[root@hmiwks04 ~]# getent passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
...
dovecot:x:97:97:dovecot:/usr/libexec/dovecot:/sbin/nologin
oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin
ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
(The first five test users were a tester's idea. The last four are mine. Bonus points for guessing the movie inspiration...)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.