I've been trying ldap for months now, and yesterday, I thought, finally got it working.
I tried several Howtos floating around in this forum and some on the web, of course the official gentoo howto too.
This time, I think, I made it because getent passwd finally showed me double-entrys
(On this point: some howtos said if I don't like the double-output of getent passwd (wich is the case), I should escape the doubled entrys in /etc/passwd (same with the groups)... but is there no... "more elegant" way?), on ldap server and client, so I thought everything is fine.
But I don't get ldap OR there's still something wrong with it, trying to passwd, I get the following:
Code: Select all
# passwd
passwd: Authentication token manipulation error
suing takes a unusual long time...
I tried to get samba to work too, using this howto:
http://www.monkeybox.org.uk/docs/gentoo/samba3.html
but at "Creating essential group mappings", I can't go further because... see it yourself:
Code: Select all
# smbldap-groupadd smbdomadmins
Could not find base dn, to get next gidNumber at /usr/share/samba/scripts//smbldap_tools.pm line 909, <DATA> line 283.
this is what I entered in directory_administrator:
Server Adress: paron-02.zaiyon.ath.cx
Search root: dc=zaiyon,dc=ath,dc=cx
DN/User ID: cn=Manager,dc=zaiyon,dc=ath,dc=cx
TLS not activated (because it causes another error on establishing connection)
my domain is zaiyon.ath.cx , my ldap servers name is paron-02, my ldap user is Manager
you may think that my problem is not really a "problem", but I obviously can't solve this myself, and I really tried hard.
If you would like to see any output, log or config file, I would be pleased to show it, I thank everyone trying to help me understand ldap in advance.
/etc/openldap/sladp.conf
Code: Select all
# $OpenLDAP:pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27 20:00:31
# kurtExp$
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
# Schema and objectClass definitions
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/samba.schema
# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck on
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
# Possible Loglevel values:
# Log levels are additive, and available levels are:
# 1 trace function calls
# 2 debug packet handling
# 4 heavy trace debugging
# 8 connection management
# 16 print out packets sent and received
# 32 search filter processing
# 64 configuration file processing
# 128 access control list processing
# 256 stats log connections/operations/results
# 512 stats log entries sent
# 1024 print communication with shell backends
# 2048 entry parsing
Loglevel 0
# Load dynamic backend modules:
# modulepath /usr/lib/openldap/openldap
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
# Password Hash
password-hash {crypt}
# TLS stuff
# Keep the following commented until everything else is working
#
#TLSCertificateFile /etc/ssl/certs/slapdcert.pem
#TLSCertificateKeyFile /etc/ssl/certs/slapdkey.pem
#TLSCACertificateFile /etc/ssl/certs/slapdcert.pem
#
# Sample Access Control
# Allow read access of root DSE
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
#
access to dn="" by * read
access to *
by self write
by users read
by anonymous auth
# if no access controls are present, the default is:
# Allow read by all
#
# rootdn can always write!
#######################################################################
# ldbm database definitions
#######################################################################
database ldbm
suffix "dc=zaiyon,dc=ath,dc=cx"
#suffix "o=My Organization Name,c=US"
rootdn "cn=Manager,dc=zaiyon,dc=ath,dc=cx"
#rootdn "cn=Manager,o=My Organization Name,c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {MD5}QtxtrIcFS5aCvmKOccZxyw==
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory /var/lib/openldap-ldbm
# Indices to maintain
index objectClass eq
index cn pres,sub,eq
index sn pres,sub,eq
## required to support pdb_getsampwnam
#index uid pres,sub,eq
## required to support pdb_getsambapwrid()
#index displayName pres,sub,eq
## uncomment these if you are storing posixAccount and
## posixGroup entries in the directory as well
index uidNumber eq
index gidNumber eq
index memberUid eq
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
index default sub
# Save the time that the entry gets modified, for database #1
lastmod on
# Where to store the replica logs for database #1
# replogfile /var/lib/openldap-slurp/replog
# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to this database only
access to *
by dn=''uid=root,ou=People,dc=zaiyon,dc=ath,dc=cx'' write
by dn="cn=Manager,dc=zaiyon,dc=ath,dc=cx" write
by users read
by anonymous auth
by * search
access to attribute=userPassword,gecos,description,sambaLMPassword,sambaNTPassword
by dn=''cn=Manager,dc=zaiyon.ath.cx'' write
by dn=''uid=root,ou=People,dc=zaiyon,dc=ath,dc=cx'' write
by self write
by anonymous auth
by * none
access to *
by dn="cn=Manager,dc=zaiyon,dc=ath,dc=cx" write
by * read
Code: Select all
host 127.0.0.1
base dc=zaiyon,dc=ath,dc=cx
scope one
pam_filter objectclass=posixaccount
pam_login_attrubute uid
pam_member_attribute memberuid
nss_base_passwd ou=People,dc=zaiyon,dc=ath,dc=cx?one
nss_base_shadow ou=People,dc=zaiyon,dc=ath,dc=cx?one
nss_base_group ou=Group,dc=zaiyon,dc=ath,dc=cx?one
nss_hosts ou=Hosts,dc=zaiyon,dc=ath,dc=cx?one
pam_password exop
# if this is the /etc/ldap.conf that is local to the server,
# i.e not a client machine then
# the following can stay commented, else uncomment
# ssl start_tls
# ssl on
Code: Select all
host 127.0.0.1
base dc=zaiyon,dc=ath,dc=cx
scope one
pam_filter objectclass=posixaccount
pam_login_attrubute uid
pam_member_attribute memberuid
nss_base_passwd ou=People,dc=zaiyon,dc=ath,dc=cx?one
nss_base_shadow ou=People,dc=zaiyon,dc=ath,dc=cx?one
nss_base_group ou=Group,dc=zaiyon,dc=ath,dc=cx?one
nss_hosts ou=Hosts,dc=zaiyon,dc=ath,dc=cx?one
pam_password exop
# if this is the /etc/ldap.conf that is local to the server,
# i.e not a client machine then
# the following can stay commented, else uncomment
# ssl start_tls
# ssl on
Code: Select all
# conf.d file for the openldap-2.1 series
#
# To enable both the standard unciphered server and the ssl encrypted
# one uncomment this line or set any other server starting options
# you may desire.
#
OPTS="-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
Code: Select all
# /etc/nsswitch.conf:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/nsswitch.conf,v 1.4 2002/11/18 19:39:22 azarah Exp $
# passwd: files ldap
# shadow: files ldap
# group: files ldap
passwd: compat files ldap
shadow: compat files ldap
group: compat files ldap
# passwd: db files nis
# shadow: db files nis
# group: db files nis
hosts: files dns ldap wins
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


