merenda
25.07.05, 09:03
Hi @all,
mir ist lezte woche aufgefallen, dass man auch wenn LDAP eingesezt, useradd und userdel weiterhin benutzen kann. Ich dachte jetzt eigentlich, dass es alles über dem LDAP - Server laufen muss, dem ist aber nicht so.
Nach dem ich mir Manpages von useradd und userdel durchgelesen habe, habe ich mir gedacht ich teste das mal gleich aus:
useradd -D cn=admin,o=firma,c=de -m mars2 Nun ist es so, Der User wird jetzt aber auf dem LDAP-Client angelegt Lokal in der
/etc/passwd und nicht wie gewünscht auf dem LDAP-Server.
Ich poste euch mal meine Konfigfiles, villeicht kann mir jemand weiter Helfen ?!
/etc/openldap/slapd.conf (LDAP-Server)
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/krb5-kdc.schema
pidfile /var/run/slapd/run/slapd.pid
argsfile /var/run/slapd/run/slapd.args
loglevel 256
schemacheck on
sizelimit 500
timelimit 3600
#### TEST - Maschinen ####
### Intel-TestMaschine
access to dn.subtree="ou=mars,ou=Test-Systeme,o=firma,c=de"
by peername="127.0.0.1" read
by peername="53.139.198.186" read
by * none
### sxA
access to dn.subtree="ou=sxA,ou=Test-Systeme,o=firma,c=de"
by peername="127.0.0.1" read
by peername="10.206.176.212" read
by * none
##################################################
# bdb database definitions
##################################################
database bdb
checkpoint 1024 5
cachesize 10000
suffix "o=firma,c=de"
rootdn "cn=admin,o=firma,c=de"
rootpw test
directory /var/lib/ldap
index default pres,eq
index objectClass eq
index cn pres,sub,eq
index sn pres,sub,eq
index uid pres,sub,eq
index displayName pres,sub,eq
index uidNumber eq
index gidNumber eq
index memberUid eq
/etc/openldap/ldap.conf(LDAP-Client)
host 10.206.176.97
base o=firma,c=de
nss_map_attribute uniqueMember uniquemember
ldap_version 3
ssl no
pam_password crypt
pam_filter objectclass=posixAccount
nss_base_passwd ou=mars,ou=Test-Systeme,o=firma,c=de
nss_base_shadow ou=mars,ou=Test-Systeme,o=firma,c=de
nss_base_group ou=mars,ou=Test-Systeme,o=firma,c=de
/etc/pam.d/sshd (LDAP-Client)
#
# PAM configuration for the "sshd" service
#
# auth
auth required pam_nologin.so no_warn
auth required pam_env.so
auth sufficient pam_ldap.so no_warn try_first_pass
auth required pam_unix2.so no_warn try_first_pass
# account
account required pam_nologin.so
account sufficient pam_ldap.so
account required pam_unix2.so
# password
session required pam_mkhomedir.so skeli=/etc/skell umask=0022
session sufficient pam_ldap.so
session required pam_unix2.so none # trace or debug
Gruß
Merenda
mir ist lezte woche aufgefallen, dass man auch wenn LDAP eingesezt, useradd und userdel weiterhin benutzen kann. Ich dachte jetzt eigentlich, dass es alles über dem LDAP - Server laufen muss, dem ist aber nicht so.
Nach dem ich mir Manpages von useradd und userdel durchgelesen habe, habe ich mir gedacht ich teste das mal gleich aus:
useradd -D cn=admin,o=firma,c=de -m mars2 Nun ist es so, Der User wird jetzt aber auf dem LDAP-Client angelegt Lokal in der
/etc/passwd und nicht wie gewünscht auf dem LDAP-Server.
Ich poste euch mal meine Konfigfiles, villeicht kann mir jemand weiter Helfen ?!
/etc/openldap/slapd.conf (LDAP-Server)
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/krb5-kdc.schema
pidfile /var/run/slapd/run/slapd.pid
argsfile /var/run/slapd/run/slapd.args
loglevel 256
schemacheck on
sizelimit 500
timelimit 3600
#### TEST - Maschinen ####
### Intel-TestMaschine
access to dn.subtree="ou=mars,ou=Test-Systeme,o=firma,c=de"
by peername="127.0.0.1" read
by peername="53.139.198.186" read
by * none
### sxA
access to dn.subtree="ou=sxA,ou=Test-Systeme,o=firma,c=de"
by peername="127.0.0.1" read
by peername="10.206.176.212" read
by * none
##################################################
# bdb database definitions
##################################################
database bdb
checkpoint 1024 5
cachesize 10000
suffix "o=firma,c=de"
rootdn "cn=admin,o=firma,c=de"
rootpw test
directory /var/lib/ldap
index default pres,eq
index objectClass eq
index cn pres,sub,eq
index sn pres,sub,eq
index uid pres,sub,eq
index displayName pres,sub,eq
index uidNumber eq
index gidNumber eq
index memberUid eq
/etc/openldap/ldap.conf(LDAP-Client)
host 10.206.176.97
base o=firma,c=de
nss_map_attribute uniqueMember uniquemember
ldap_version 3
ssl no
pam_password crypt
pam_filter objectclass=posixAccount
nss_base_passwd ou=mars,ou=Test-Systeme,o=firma,c=de
nss_base_shadow ou=mars,ou=Test-Systeme,o=firma,c=de
nss_base_group ou=mars,ou=Test-Systeme,o=firma,c=de
/etc/pam.d/sshd (LDAP-Client)
#
# PAM configuration for the "sshd" service
#
# auth
auth required pam_nologin.so no_warn
auth required pam_env.so
auth sufficient pam_ldap.so no_warn try_first_pass
auth required pam_unix2.so no_warn try_first_pass
# account
account required pam_nologin.so
account sufficient pam_ldap.so
account required pam_unix2.so
# password
session required pam_mkhomedir.so skeli=/etc/skell umask=0022
session sufficient pam_ldap.so
session required pam_unix2.so none # trace or debug
Gruß
Merenda