Проблемы с LDAP (Ошибка с пользователями.)
Модераторы: SLEDopit, Модераторы разделов
-
Terror
- Сообщения: 12
Проблемы с LDAP
Установил LDAP, настроил. Завожу пользователя все отлично. В базе LDAP а появляется, но проблема в том что в LINIX самом он не появляется. ОС Fedora 8. Соответсвенно машины в домен не заводятся и не заходят. Набираю ID пользователь. Пишет что такого пользователя нет. В чем может быть проблема ?
-
HRonik
- Сообщения: 140
- ОС: Debian
Re: Проблемы с LDAP
Terror писал(а): ↑28.04.2008 08:39Установил LDAP, настроил. Завожу пользователя все отлично. В базе LDAP а появляется, но проблема в том что в LINIX самом он не появляется. ОС Fedora 8. Соответсвенно машины в домен не заводятся и не заходят. Набираю ID пользователь. Пишет что такого пользователя нет. В чем может быть проблема ?
помоему пользователь Ldap и системный пользователь, это разные вещи...
Для домена , я так полагаю, поднята samba?
ну дык и давайте конфиги и логи в студию, разберемся что не работает...
-
Terror
- Сообщения: 12
Re: Проблемы с LDAP
Openldap
slapd.conf
smbldap.conf
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
#BASE dc=example, dc=com
#URI ldap://ldap.example.com ldap://ldap-master.example.com:666
#SIZELIMIT 2000
#TIMELIMIT 15
#DEREF never
URI ldap://127.0.0.1/ ldap://localhost/
BASE dc=lip,dc=org,dc=ru
TLS_CACERTDIR /etc/openldap/cacerts
slapd.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
##########################################################
#
# Global options
#
##########################################################
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/samba.schema
include /etc/openldap/schema/sendmail.schema
include /etc/openldap/schema/misc.schema
schemacheck on
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2
# 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
#loglevel 265
loglevel 256
#loglevel 2048
#loglevel 768
#loglevel 2048
##########################################
#
# ACLs include
#
##########################################
include /etc/openldap/slapd.acl
####################################################################
#
# database definitions
#
####################################################################
#
# -- lipcok.lipetskenergo.ru database
database bdb
suffix "dc=lip,dc=org,dc=ru"
rootdn "cn=ldapadmin,dc=lip,dc=org,dc=ru"
rootpw PASSWORD
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap/lip
index objectClass pres,eq
index uidNumber,gidNumber,memberUid eq
index sambaPrimaryGroupSID,sambaDomainName,sambaSIDList,sambaGroupType eq
index uid,ou,cn,mail,surname,givenname,displayName,sambaSID pres,sub,eq
index leMailAuth,leProxyAuth eq
index default sub
#
# -- monitor database
#
database monitor
rootdn "cn=ldapadmin,cn=monitor"
rootpw PASSWORD
smbldap.conf
##############################################################################
#
# General Configuration
#
##############################################################################
# Put your own SID. To obtain this number do: "net getlocalsid".
# If not defined, parameter is taking from "net getlocalsid" return
SID="S-1-5-21-1998229997-776410819-3792093364"
# Domain name the Samba server is in charged.
# If not defined, parameter is taking from smb.conf configuration file
# Ex: sambaDomain="IDEALX-NT"
#sambaDomain="LIP"
##############################################################################
#
# LDAP Configuration
#
##############################################################################
# Notes: to use to dual ldap servers backend for Samba, you must patch
# Samba with the dual-head patch from IDEALX. If not using this patch
# just use the same server for slaveLDAP and masterLDAP.
# Those two servers declarations can also be used when you have
# . one master LDAP server where all writing operations must be done
# . one slave LDAP server where all reading operations must be done
# (typically a replication directory)
# Slave LDAP server
# Ex: slaveLDAP=127.0.0.1
# If not defined, parameter is set to "127.0.0.1"
slaveLDAP="127.0.0.1"
# Slave LDAP port
# If not defined, parameter is set to "389"
slavePort="389"
# Master LDAP server: needed for write operations
# Ex: masterLDAP=127.0.0.1
# If not defined, parameter is set to "127.0.0.1"
masterLDAP="127.0.0.1"
# Master LDAP port
# If not defined, parameter is set to "389"
masterPort="389"
# Use TLS for LDAP
# If set to 1, this option will use start_tls for connection
# (you should also used the port 389)
# If not defined, parameter is set to "1"
ldapTLS="0"
# How to verify the server's certificate (none, optional or require)
# see "man Net::LDAP" in start_tls section for more details
verify="require"
# CA certificate
# see "man Net::LDAP" in start_tls section for more details
cafile="/etc/pki/tls/certs/ldapserverca.pem"
# certificate to use to connect to the ldap server
# see "man Net::LDAP" in start_tls section for more details
clientcert="/etc/pki/tls/certs/ldapclient.pem"
# key certificate to use to connect to the ldap server
# see "man Net::LDAP" in start_tls section for more details
clientkey="/etc/pki/tls/certs/ldapclientkey.pem"
# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=lip,dc=org,dc=ru"
# Where are stored Users
# Ex: usersdn="ou=Users,dc=IDEALX,dc=ORG"
# Warning: if 'suffix' is not set here, you must set the full dn for usersdn
usersdn="ou=People,${suffix}"
# Where are stored Computers
# Ex: computersdn="ou=Computers,dc=IDEALX,dc=ORG"
# Warning: if 'suffix' is not set here, you must set the full dn for computersdn
computersdn="ou=Computers,${suffix}"
# Where are stored Groups
# Ex: groupsdn="ou=Groups,dc=IDEALX,dc=ORG"
# Warning: if 'suffix' is not set here, you must set the full dn for groupsdn
groupsdn="ou=Group,${suffix}"
# Where are stored Idmap entries (used if samba is a domain member server)
# Ex: idmapdn="ou=Idmap,dc=IDEALX,dc=ORG"
# Warning: if 'suffix' is not set here, you must set the full dn for idmapdn
idmapdn="ou=Idmap,${suffix}"
# Where to store next uidNumber and gidNumber available for new users and groups
# If not defined, entries are stored in sambaDomainName object.
# Ex: sambaUnixIdPooldn="sambaDomainName=${sambaDomain},${suffix}"
# Ex: sambaUnixIdPooldn="cn=NextFreeUnixId,${suffix}"
#sambaUnixIdPooldn="sambaDomainName=lip,${suffix}"
# Default scope Used
scope="sub"
# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="SSHA"
# if hash_encrypt is set to CRYPT, you may set a salt format.
# default is "%s", but many systems will generate MD5 hashed
# passwords if you use "$1$%.8s". This parameter is optional!
crypt_salt_format="%s"
##############################################################################
#
# Unix Accounts Configuration
#
##############################################################################
# Login defs
# Default Login Shell
# Ex: userLoginShell="/bin/bash"
userLoginShell="/bin/false"
# Home directory
# Ex: userHome="/home/%U"
userHome="/home/%U"
# Default mode used for user homeDirectory
userHomeDirectoryMode="700"
# Gecos
userGecos="User"
# Default User (POSIX and Samba) GID
defaultUserGid="513"
# Default Computer (Samba) GID
defaultComputerGid="515"
# Skel dir
skeletonDir="/etc/samba/skel"
# Default password validation time (time in days) Comment the next line if
# you don't want password to be enable for defaultMaxPasswordAge days (be
# careful to the sambaPwdMustChange attribute's value)
#defaultMaxPasswordAge="45"
##############################################################################
#
# SAMBA Configuration
#
##############################################################################
# The UNC path to home drives location (%U username substitution)
# Just set it to a null string if you want to use the smb.conf 'logon home'
# directive and/or disable roaming profiles
# Ex: userSmbHome="\\PDC-SMB3\%U"
userSmbHome="\\srv.lip.org.ru\homes\%U"
#userSmbHome=""
# The UNC path to profiles locations (%U username substitution)
# Just set it to a null string if you want to use the smb.conf 'logon path'
# directive and/or disable roaming profiles
# Ex: userProfile="\\PDC-SMB3\profiles\%U"
userProfile="\\srv.lip.org.ru\profiles\%U"
#userProfile=""
# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: userHomeDrive="H:"
userHomeDrive="Q:"
# The default user netlogon script name (%U username substitution)
# if not used, will be automatically username.cmd
# make sure script file is edited under dos
# Ex: userScript="startup.cmd" # make sure script file is edited under dos
userScript="netlogon.bat"
# Domain appended to the users "mail"-attribute
# when smbldap-useradd -M is used
# Ex: mailDomain="idealx.com"
mailDomain="mail.ru"
##############################################################################
#
# SMBLDAP-TOOLS Configuration (default are ok for a RedHat)
#
##############################################################################
# Allows not to use smbpasswd (if with_smbpasswd == 0 in smbldap_conf.pm) but
# prefer Crypt::SmbHash library
with_smbpasswd="0"
smbpasswd="/usr/bin/smbpasswd"
# Allows not to use slappasswd (if with_slappasswd == 0 in smbldap_conf.pm)
# but prefer Crypt:: libraries
with_slappasswd="0"
slappasswd="/usr/sbin/slappasswd"
# comment out the following line to get rid of the default banner
# no_banner="1"
-
kaa
- Сообщения: 216
- ОС: Arch, Slackware
Re: Проблемы с LDAP
ничего не сказано о nsswith и pam. А это нужно настроить для использования ldap для хранения пользователей и групп
проверять правильность настройки в данном случае можно быстро и изячно: id User_Name
проверять правильность настройки в данном случае можно быстро и изячно: id User_Name
Ничто так не бодрит по утрам, как свежеупавший сервер.
-
Terror
- Сообщения: 12
Re: Проблемы с LDAP
HRonik писал(а): ↑28.04.2008 08:46Terror писал(а): ↑28.04.2008 08:39Установил LDAP, настроил. Завожу пользователя все отлично. В базе LDAP а появляется, но проблема в том что в LINIX самом он не появляется. ОС Fedora 8. Соответсвенно машины в домен не заводятся и не заходят. Набираю ID пользователь. Пишет что такого пользователя нет. В чем может быть проблема ?
помоему пользователь Ldap и системный пользователь, это разные вещи...
Для домена , я так полагаю, поднята samba?
ну дык и давайте конфиги и логи в студию, разберемся что не работает...
Да, самба поднята. Не, все равно группы и пользователи если даже не в линукс создаются, все равно ID длжны отображатся.
-
HRonik
- Сообщения: 140
- ОС: Debian
Re: Проблемы с LDAP
Вот уж напридумали...впервые вижу такое объеденение самбы и лдапа, только вот не вижу конфига самой самбы...
так как по этой конфигурации сказать ничего не смогу, сам такое не пробывал, поэтому давай логи при попытке записаться в домен.
так как по этой конфигурации сказать ничего не смогу, сам такое не пробывал, поэтому давай логи при попытке записаться в домен.
-
Terror
- Сообщения: 12
Re: Проблемы с LDAP
nsswith
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files ldap
shadow: files ldap
group: files ldap
#hosts: db files nisplus nis dns
hosts: files dns
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files ldap
rpc: files
services: files ldap
netgroup: files ldap
publickey: nisplus
automount: files ldap
aliases: files nisplus
А в pam написано только lip
Команда ID говорит что такого юзера нет, хотя он создан.
-
kaa
- Сообщения: 216
- ОС: Arch, Slackware
Re: Проблемы с LDAP
надеюсь, сервер ldap запущен? ;-)
Вот такой файлик есть?
/etc/pam.d/samba
Вот такой файлик есть?
/etc/pam.d/samba
Ничто так не бодрит по утрам, как свежеупавший сервер.
-
Terror
- Сообщения: 12
-
kaa
- Сообщения: 216
- ОС: Arch, Slackware
Re: Проблемы с LDAP
ух. :-( тогда пробовать ldapsearch, что бы получить подробную инфу об акаунте и убедиться, что юзет есть.
А потом id user_name и смотреть /var/log/messages
Сорри, лучшего на ум что-то не приходит :-(
А потом id user_name и смотреть /var/log/messages
Сорри, лучшего на ум что-то не приходит :-(
Ничто так не бодрит по утрам, как свежеупавший сервер.
-
Terror
- Сообщения: 12
Re: Проблемы с LDAP
Кстати интересный момент. Когда ввожу машину в домен, пишет винда что такого юзера нету на аккаунт Домаин Админа. А машина в ЛДАПе в разделе Компьютерс создается.
-
kaa
- Сообщения: 216
- ОС: Arch, Slackware
Re: Проблемы с LDAP
странно :-/ не могу прокоментировать. Не должно так быть :-)
Ничто так не бодрит по утрам, как свежеупавший сервер.
-
togusak
- Сообщения: 4
- ОС: linux
Re: Проблемы с LDAP
в файле /etc/group добавить в конце строку:
+:::
в файле /etc/passwd добавить в конце строку:
+::::::
+:::
в файле /etc/passwd добавить в конце строку:
+::::::