Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

LDAP Error: ldap_search_s No such object [solved]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
eunuque
n00b
n00b
User avatar
Posts: 62
Joined: Tue Aug 19, 2003 4:27 pm

LDAP Error: ldap_search_s No such object [solved]

  • Quote

Post by eunuque » Sun Jan 16, 2005 9:52 pm

Hi all,

I've followed the "Gentoo Guide to OpenLDAP Authentication",
http://www.gentoo.org/doc/en/ldap-howto.xml

But at the end the getent passwd|grep 0:0 command returned me a single
line. So I tried to keep things simple...

I emerged openldap, migrationtools, pam_ldap, and nss_ldap (my USE flag contains ldap and pam).
The versions I use are:
openldap-2.1.30-r4
migrationtools-46
pam-0.77-r4
pam_ldap-176
nss_ldap-226


My configuration is the following:

/etc/openldap/sldap.conf:

Code: Select all

include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema


#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
suffix          "dc=shacknet,dc=nu"
rootdn          "cn=Manager,dc=shacknet,dc=nu"
rootpw          secret
directory       /var/lib/openldap-ldbm
# Indices to maintain
index   objectClass     eq
/etc/ldap.conf:

Code: Select all

BASE         dc=shacknet, dc=nu
URI            ldap://dieu.shacknet.nu
/etc/pam.d/system-auth:

Code: Select all

auth       required        /lib/security/pam_env.so
auth       sufficient  /lib/security/pam_ldap.so use_first_pass
auth       sufficient  /lib/security/pam_unix.so likeauth nullok nodelay
auth       required        /lib/security/pam_deny.so

account    sufficient  /lib/security/pam_unix.so
account    sufficient  /lib/security/pam_ldap.so
account    required        /lib/security/pam_deny.so

password   required        /lib/security/pam_cracklib.so retry=3
password   sufficient  /lib/security/pam_unix.so nullok md5 shadow use_authtok
password   sufficient  /lib/security/pam_ldap.so use_authtok
password   required        /lib/security/pam_deny.so

session    required        /lib/security/pam_limits.so
session    required        /lib/security/pam_unix.so
session    required    /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0
session    optional    /lib/security/pam_ldap.so
/etc/nsswitch.conf:

Code: Select all

passwd:         files ldap
group:          files ldap
shadow:         files ldap

hosts:       files dns
networks:    files dns

services:    db files
protocols:   db files
rpc:         db files
ethers:      db files
netmasks:    files
netgroup:    files
bootparams:  files

automount:   files
aliases:     files
I used migrationtools to convert my system info into the LDAP database.

When logging in, LDAP says (auth.log):
pam_ldap: ldap_search_s No such object


However, ldapsearch -x 'uid=myuser' gives my correct info...


Any help?
Last edited by eunuque on Mon Jan 17, 2005 6:13 pm, edited 1 time in total.
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Mon Jan 17, 2005 10:31 am

/etc/ldap.conf needs a little more info

Code: Select all

pam_filter objectclass=posixAccount
pam_login_attribute uid
pam_member_attribute gidNumber
nss_base_passwd dc=development,dc=ltl?sub
nss_base_shadow dc=development,dc=ltl?sub
nss_base_group  ou=Groups,dc=development,dc=ltl?one
Top
eunuque
n00b
n00b
User avatar
Posts: 62
Joined: Tue Aug 19, 2003 4:27 pm

  • Quote

Post by eunuque » Mon Jan 17, 2005 6:16 pm

Thanks!!!
I added the following lines in /etc/ldap.conf:

Code: Select all

pam_filter objectclass=posixAccount
pam_login_attribute uid
pam_member_attribute gidNumber
nss_base_passwd dc=shacknet,dc=nu
nss_base_shadow dc=shacknet,dc=nu
nss_base_group  ou=Groups,dc=shacknet,dc=nu 

And now it works.
Top
eunuque
n00b
n00b
User avatar
Posts: 62
Joined: Tue Aug 19, 2003 4:27 pm

  • Quote

Post by eunuque » Tue Jan 18, 2005 10:35 pm

Also note that my default /etc/pam.d/sshd configuration file did NOT worked with LDAP.

Here is the line I added:

Code: Select all

#%PAM-1.0

auth       required     pam_nologin.so
auth       sufficient   pam_ldap.so                          <<<<<<< LINE ADDED <<<<<<
auth       required     pam_stack.so service=system-auth
auth       required     pam_shells.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic