LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   simple LDAP problem :) (https://www.linuxquestions.org/questions/linux-security-4/simple-ldap-problem-392043/)

Krugger 12-12-2005 03:40 PM

simple LDAP problem :)
 
I am trying to set up slapd so that it provides the same functions as NIS(same uids across machines, same passwords but that isn't important as they use publickey anyway, network is trusted) and I can sucessfully get the user list with ldapsearch, using:

ldapsearch -x -b "dc=testserver"

This dumps the passwd, as intended.

However I can't use ssh to get into the machine. There is the following error message:

pam_ldap: error trying to bind as user "uid=user01,dc=testserver" (Server is unwilling to perform)


The following slapd.conf is being used:

#allow bind_v2
idletimeout 60

...(default things) ...

moduleload back_passwd

backend passwd
database passwd
lastmod off
readonly on
suffix "dc=testserver"
access to * by * read

nsswitch.conf

passwd: ldap compat
group: ldap compat
shadow: ldap compat

...

Why is the server not willing to perform? I should only get that error if I would try to write. libnss_ldap is installed.

Other things:
Server is firewalled, but not on that interface.
SSH is chrooted using libpam_chroot, however that isn't the problem as it doesn't get to the session part, where the chroot is done.
LDAP version is 3.
Although I have created and used successfully publickey auth in localhost I can't login to the NFS mounted home directory of user, as it asks for a password and fails with the above message.

linuxxed 12-12-2005 05:04 PM

Look in two files :

/etc/ldap.conf
/etc/openldap/ldap.conf

Both of them should be configured for the client properly. Post these files.

Are you able to locally logon to the client machine and finger the ldap user? (finger user01)

Are you using TLS encryption by any chance? If yes then the URI should *exactly* match the certificate common name.

Have you checked /etc/pam.d/ssh file? Did you add the relevant lines to authenticate using pam_ldap?

Can you telnet to ldap host and ldap port and connect successfully from the client?

HTH

Krugger 12-16-2005 10:03 AM

/etc/ldap/ldap.conf:
URI:ldap://10.0.0.254

/etc/pam.d/ssh (relevant parts only)
# Standard Un*x authentication.
auth sufficient pam_ldap.so
@include common-auth

# Standard Un*x authorization.
account sufficient pam_ldap.so
@include common-account

I can connect to the ldap server, as the ldapsearch is working when I do it from the nodes.

I was just wondering, when I share passwd with ldap. It only actually shares passwd, so I shouldn't have ldap in shadows or group, right?


All times are GMT -5. The time now is 02:32 AM.