Ik ben bezig met het opzetten van een openldap server op mijn slackware 8.1 met kernel 2.4.21 server(tje).
Grotendeels heb ik deze tutorial gevolgd
http://linsec.ca/usermgmt/openldap.php
Het probleem is dat ik niet kan inloggen, en geen tools die daar mee te maken hebben kan gebruiken (su, passwd, ssh )
Wel kan ik de info in de LDAP database opvragen met finger <naam gebruiker> en met ldapsearch.
Ik ben alles nog aan het testen op de server zelf.
Bij su geeft hij een segmentation fault
en bij de debug (debug=1) van slapd komt de volgende foutmelding voorbij
ook de volgende regels komen voorbij wat mij ook niet helemaal goed lijkt
Bij passwd ( passwd <naam gebruiker> ) geeft hij aan dat hij de betreffende gebruiker niet kan vinden in /etc/passwd. maar ja
ze zitten in de LDAP database.
Bij het inloggen via SSH (ssh -l <naam user> -v 10.0.0.155) krijg ik de melding
ook de volgende regels komen weer voorbij bij de debug van slapd net zoals bij su
Ik heb alle software gedownload als source en zelf compiled
==== De software ====
OpenLDAP 2.3.4
pam_ldap-178
nss_ldap-239
MigrationTools-46
db-4.3.28-NC
==================
=====Configure regels========
OpenLDAP = ./configure --prefix=/usr/local/openldap --sysconfdir=/etc/openldap --enable-crypt
pam_ldap = ./configure --with-ldap-lib=openldap --with-ldap-dir=/usr/local/openldap
nss_ldap = ./configure --with-ldap-lib=openldap --with-ldap-dir=/usr/local/openldap
db-4.3.2.28 = ./configure
========================
Mijn config files
[/etc/ldap.conf]
[/etc/openldap/slapd.conf]
[/etc/openldap/slapd.acces.conf]
[/etc/nsswitch.conf]
[/etc/pam.conf] gebruikt van nss_ldap-147 zat bij de source als example
Grotendeels heb ik deze tutorial gevolgd
http://linsec.ca/usermgmt/openldap.php
Het probleem is dat ik niet kan inloggen, en geen tools die daar mee te maken hebben kan gebruiken (su, passwd, ssh )
Wel kan ik de info in de LDAP database opvragen met finger <naam gebruiker> en met ldapsearch.
Ik ben alles nog aan het testen op de server zelf.
Bij su geeft hij een segmentation fault
en bij de debug (debug=1) van slapd komt de volgende foutmelding voorbij
| ber_get_next on fd 12 failed errno=11 (Resource temporarily unavailable) |
ook de volgende regels komen voorbij wat mij ook niet helemaal goed lijkt
| > bdb_dn2idl("ou=people,dc=baklap,dc=nl") <= bdb_dn2idl: id=28 first=1367 last=1394 => bdb_equality_candidates (objectClass) <= bdb_equality_candidates: (objectClass) index_param failed (18) => bdb_equality_candidates (objectClass) <= bdb_equality_candidates: (objectClass) index_param failed (18) => bdb_equality_candidates (uid) <= bdb_equality_candidates: (uid) index_param failed (18) bdb_search_candidates: id=-1 first=1367 last=1394 bdb_search: 1367 does not match filter bdb_search: 1368 does not match filter bdb_search: 1369 does not match filter bdb_search: 1370 does not match filter bdb_search: 1371 does not match filter bdb_search: 1372 does not match filter bdb_search: 1373 does not match filter bdb_search: 1374 does not match filter bdb_search: 1375 does not match filter bdb_search: 1376 does not match filter bdb_search: 1377 does not match filter bdb_search: 1378 does not match filter bdb_search: 1379 does not match filter bdb_search: 1380 does not match filter bdb_search: 1381 does not match filter bdb_search: 1382 does not match filter bdb_search: 1383 does not match filter bdb_search: 1384 does not match filter bdb_search: 1385 does not match filter bdb_search: 1386 does not match filter bdb_search: 1387 does not match filter bdb_search: 1388 does not match filter |
Bij passwd ( passwd <naam gebruiker> ) geeft hij aan dat hij de betreffende gebruiker niet kan vinden in /etc/passwd. maar ja
Bij het inloggen via SSH (ssh -l <naam user> -v 10.0.0.155) krijg ik de melding
| debug1: Next authentication method: password debug1: Authentication succeeded (password). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: channel 0: free: client-session, nchannels 1 Read from remote host 10.0.0.155: Connection reset by peer Connection to 10.0.0.155 closed. debug1: Transferred: stdin 0, stdout 0, stderr 94 bytes in 0.1 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 1070.0 debug1: Exit status -1 |
ook de volgende regels komen weer voorbij bij de debug van slapd net zoals bij su
| > bdb_dn2idl("ou=people,dc=baklap,dc=nl") <= bdb_dn2idl: id=28 first=1367 last=1394 => bdb_equality_candidates (objectClass) <= bdb_equality_candidates: (objectClass) index_param failed (18) => bdb_equality_candidates (objectClass) <= bdb_equality_candidates: (objectClass) index_param failed (18) => bdb_equality_candidates (uid) <= bdb_equality_candidates: (uid) index_param failed (18) bdb_search_candidates: id=-1 first=1367 last=1394 bdb_search: 1367 does not match filter bdb_search: 1368 does not match filter bdb_search: 1369 does not match filter bdb_search: 1370 does not match filter bdb_search: 1371 does not match filter bdb_search: 1372 does not match filter bdb_search: 1373 does not match filter bdb_search: 1374 does not match filter bdb_search: 1375 does not match filter bdb_search: 1376 does not match filter bdb_search: 1377 does not match filter bdb_search: 1378 does not match filter bdb_search: 1379 does not match filter bdb_search: 1380 does not match filter bdb_search: 1381 does not match filter bdb_search: 1382 does not match filter bdb_search: 1383 does not match filter bdb_search: 1384 does not match filter bdb_search: 1385 does not match filter bdb_search: 1386 does not match filter bdb_search: 1387 does not match filter bdb_search: 1388 does not match filter |
Ik heb alle software gedownload als source en zelf compiled
==== De software ====
OpenLDAP 2.3.4
pam_ldap-178
nss_ldap-239
MigrationTools-46
db-4.3.28-NC
==================
=====Configure regels========
OpenLDAP = ./configure --prefix=/usr/local/openldap --sysconfdir=/etc/openldap --enable-crypt
pam_ldap = ./configure --with-ldap-lib=openldap --with-ldap-dir=/usr/local/openldap
nss_ldap = ./configure --with-ldap-lib=openldap --with-ldap-dir=/usr/local/openldap
db-4.3.2.28 = ./configure
========================
Mijn config files
[/etc/ldap.conf]
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| host 127.0.0.1 base dc=baklap,dc=nl rootbinddn cn=manager,dc=baklap,dc=nl scope one pam_filter objectclass=posixaccount pam_login_attribute uid pam_member_attribute gid pam_password md5 ssl off nss_base_passwd ou=People,dc=baklap,dc=nl?one nss_base_shadow ou=People,dc=baklap,dc=nl?one nss_base_group ou=Group,dc=baklap,dc=nl?one nss_base_hosts ou=Hosts,dc=baklap,dc=nl?one nss_base_networks ou=Networks,dc=baklap,dc=nl?one |
[/etc/openldap/slapd.conf]
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| 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/misc.schema
include /etc/openldap/schema/samba.schema
# Define global ACLs to disable default read access.
#include /etc/openldap/slapd.access.conf //ik het dit hier gecomment maar dat maakte niet uit, het werk nog steeds niett
#schemacheck on
#pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
password-hash {CRYPT}
password-crypt-salt-format "$1$%.8s"
replogfile /var/lib/ldap/replog
loglevel 1024
database bdb
suffix "dc=baklap,dc=nl"
rootdn "cn=manager,dc=baklap,dc=nl"
rootpw {MD5}/930nMlJa4bf8WnS/XYMRw==
directory /var/lib/ldap |
[/etc/openldap/slapd.acces.conf]
code:
1
2
3
4
5
6
7
8
9
| access to attr=userPassword
by self write
by anonymous auth
by dn.base="cn=manager,dc=baklap,dc=nl" write
access to *
by self write
by dn.base="cn=root,dc=baklap,dc=nl" write
by * read |
[/etc/nsswitch.conf]
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| passwd: ldap files shadow ldap files group: ldap files hosts: files ldap dns networks: files ldap services: db files protocols: db files rpc: db files ethers: db files netmasks: files netgroup: files bootparams: files automount: files aliases: files ldap |
[/etc/pam.conf] gebruikt van nss_ldap-147 zat bij de source als example
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| # # Authentication management # auth sufficient /lib/security/pam_env.so auth sufficient /lib/security/pam_unix.so likeaut nullok auth sufficient /lib/security/pam_ldap.so use_first_pass auth required /lib/security/pam_deny.so # # Account management # account required /lib/security/pam_unix.so account sufficient /lib/security/pam_ldap.so # # Password management # password required /lib/security/pam_cracklib.so retry=3 minlen=4 dcredit=0 ucredit=0 password sufficient /lib/security/pam_unix.so nullok use_authlok md5 shadow password sufficent /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 optional /lib/security/pam_ldap.so |
[ Voor 12% gewijzigd door Verwijderd op 04-08-2005 22:09 . Reden: pam.conf hoorde ook nog bij de config files :P ]