LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 12-12-2005, 03:40 PM   #1
Krugger
Member
 
Registered: Oct 2004
Posts: 229

Rep: Reputation: 30
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.
 
Old 12-12-2005, 05:04 PM   #2
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
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
 
Old 12-16-2005, 10:03 AM   #3
Krugger
Member
 
Registered: Oct 2004
Posts: 229

Original Poster
Rep: Reputation: 30
/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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP: Can't contact master ldap server rulirahm Linux - Networking 2 07-14-2014 02:02 AM
LDAP server not starting as user LDAP klnasveschuk Fedora 1 02-15-2007 04:49 AM
ldap problem egyptian Linux - Networking 0 11-07-2004 02:19 AM
ldap-abook unable to get street name in ldap-entry Jingle Linux - Software 1 06-06-2004 07:13 PM
A simple LDAP server wanted MOCKBA Linux - Software 1 10-09-2003 12:15 PM


All times are GMT -5. The time now is 10:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration