Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1599 connectés 

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

PDC Samba LDAP

n°920051
rkonan
Posté le 06-06-2007 à 16:28:40  profilanswer
 

Bonjour à tous
Je suis en train de mettre en marche un serveur Samba Ldap sur ma Debian Sage.
Les choses se passe bien jusqu'à l'authentification Unix.
J'ajoute les module nss et pam.
Pour faire le test je lance getent passwd
et voilà ce que j'ai comme message.

 
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
Debian-exim:x:102:102::/var/spool/exim4:/bin/false
srvtest:x:1000:1000:serveur test,,,:/home/srvtest:/bin/bash
messagebus:x:100:103::/var/run/dbus:/bin/false
hal:x:104:104:Hardware abstraction layer,,,:/var/run/hal:/bin/false
sshd:x:101:65534::/var/run/sshd:/bin/false
identd:x:103:65534::/var/run/identd:/bin/false
bind:x:105:107::/var/cache/bind:/bin/false
saned:x:109:109::/home/saned:/bin/false
gdm:x:106:111:Gnome Display Manager:/var/lib/gdm:/bin/false
telnetd:x:112:112::/nonexistent:/bin/false
fetchmail:x:107:65534::/var/run/fetchmail:/bin/sh
mysql:x:108:113:MySQL Server,,,:/var/lib/mysql:/bin/false
ftp:x:110:65534::/home/ftp:/bin/false
ftpuser:x:2001:2001:proftpd user:/bin/null:/bin/false
anonymous_ftp:x:2002:2002:Anonymous FTP User:/home/anonymous_ftp:/bin/false
 
D'où peuvent provenir ces erreurs?
Donnez moi un coup de main s'il vous plaît.

mood
Publicité
Posté le 06-06-2007 à 16:28:40  profilanswer
 

n°920058
boobaka
Posté le 06-06-2007 à 16:45:15  profilanswer
 

Quelles erreurs?
Pas d'erreur là, il s'agit de ta liste d'user.....

 


Message édité par boobaka le 06-06-2007 à 16:45:56

---------------
www.google.fr  
n°920065
rkonan
Posté le 06-06-2007 à 16:52:05  profilanswer
 

Merci pour cette info
Mais parmi les utilisateurs il y a un que je ne vois pas.
En fait ce qui me fait parler d'erreur c'est le nom de fichier /false.

n°920068
bichtoubar​d
Posté le 06-06-2007 à 16:56:42  profilanswer
 

Ca veut juste dire que ces utilisateurs ne peuvent pas disposer d'un shell sur ta machine ;)
En gros ils peuvent pas se connecter, et c'est tant mieux ils sont juste utilisés pour lancer un service.

n°920090
rkonan
Posté le 06-06-2007 à 17:47:34  profilanswer
 

Voici une ligne de mon fichier syslog
Jun  6 15:39:02 debian1 CRON[1679]: nss_ldap: could not connect to any
LDAP server as (null) - Can't contact LDAP server

n°920097
boobaka
Posté le 06-06-2007 à 18:15:28  profilanswer
 

Ton serveur ldap tourne?
nmap -sS tonadresseIP
 


---------------
www.google.fr  
n°920105
rkonan
Posté le 06-06-2007 à 18:39:45  profilanswer
 

Voici le resultat.
 
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2007-06-06 16:36 GMT
Interesting ports on debian1.sucrivoire (192.168.200.199):
(The 1652 ports scanned but not shown below are in state: closed)
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
53/tcp   open  domain
80/tcp   open  http
139/tcp  open  netbios-ssn
143/tcp  open  imap
389/tcp  open  ldap
445/tcp  open  microsoft-ds
548/tcp  open  afpovertcp
993/tcp  open  imaps
3306/tcp open  mysql
 
Nmap finished: 1 IP address (1 host up) scanned in 0.693 seconds

n°920155
bichtoubar​d
Posté le 06-06-2007 à 23:34:09  profilanswer
 

Tu peux nous montrer le fichier de conf de ton serveur LDAP ?

n°920963
rkonan
Posté le 08-06-2007 à 17:11:02  profilanswer
 

Voici mon fichier de configuration
 
slaveLDAP="127.0.0.1"
slavePort="389"
masterLDAP="127.0.0.1"
masterPort="389"
ldapTLS="0"
verify="require"
### A changer ==>
suffix="dc=ldap, dc=zla"
usersdn="ou=Users,${suffix}"
computersdn="ou=Machines,${suffix}"
groupsdn="ou=Groups,${suffix}"
idmapdn="ou=Idmap,${suffix}"
scope="sub"
hash_encrypt="SSHA"
crypt_salt_format="%s"
         
userLoginShell="/bin/bash"
userHome="/home/%U"
userHomeDirectoryMode="700"
userGecos="System User"
defaultUserGid="513"
defaultComputerGid="515"
skeletonDir="/etc/skel"
defaultMaxPasswordAge="45"
         
with_smbpasswd="0"
smbpasswd="/usr/bin/smbpasswd"
       
with_slappasswd="0"
slappasswd="/usr/sbin/slappasswd"  

n°921040
aknott31
Que la fête commence...
Posté le 08-06-2007 à 20:23:50  profilanswer
 

ca c'est pas la conf du serveur ldap mais celle des smbldap tools d'IDEALX
 
c'est le slapd.conf (dans /etc/openldap) que l'on veut pas le smbldap.conf
 
de plus, ton /etc/nsswitch.conf il est comment pour:
passwd: .....
group: .....
shadow: .....
 
que retourne un slapcat ?


---------------
hebergez vos images
mood
Publicité
Posté le 08-06-2007 à 20:23:50  profilanswer
 

n°921130
rkonan
Posté le 09-06-2007 à 10:27:40  profilanswer
 

Voici mon fichier /etc/ldap/slap.conf
 
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.
 
#######################################################################
# Global Directives:
 
# Features to permit
#allow bind_v2
 
# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include  /etc/ldap/schema/samba.schema
 
# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck     on
 
# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid
 
# List of arguments that were passed to the server
argsfile        /var/run/slapd.args
 
# Read slapd.conf(5) for possible values
loglevel        0
 
# Where the dynamically loaded modules are stored
modulepath /usr/lib/ldap
moduleload back_bdb
 
#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend  bdb
checkpoint 512 30
 
#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend  <other>
 
#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        bdb
 
# The base of your directory in database #1
suffix          "dc=ldap,dc=zla"
rootdn  "cn=admin,dc=ldap,dc=zla"
rootpw  {SSHA}K+oseKrsW/CZOgLTdVCNk7fZn6TiGzu8
 
# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"
 
# Indexing options for database #1
index           objectClass eq
 
# 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/ldap/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 database #1 only
access to attrs=userPassword
        by dn="cn=admin,dc=ldap,dc=zla" write
        by anonymous auth
        by self write
        by * none
 
# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work  
# happily.
access to dn.base="" by * read
 
# The admin dn has full write access, everyone else
# can read everything.
access to *
        by dn="cn=admin,dc=ldap,dc=zla" write
        by * read
 
# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
#        by dn="cn=admin,dc=ldap,dc=zla" write
#        by dnattr=owner write
 
#######################################################################
# Specific Directives for database #2, of type 'other' (can be bdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database        <other>
 
# The base of your directory for database #2
#suffix  "dc=debian,dc=org"
 
voici aussi le contenu de /etc/nsswitch.con
 
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
 
passwd:         compat ldap
group:          compat ldap
shadow:         compat ldap
 
hosts:          files dns
networks:       files
 
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
 
netgroup:       nis
 
Voici une partie du résultat de slapcat
 
dn: cn=Replicators,ou=Groups,dc=ldap,dc=zla
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 552
cn: Replicators
description: Netbios Domain Supports file replication in a sambaDomainName
sambaSID: S-1-5-32-552
sambaGroupType: 5
displayName: Replicators
structuralObjectClass: posixGroup
entryUUID: 105c1a08-a875-102b-9c10-9356b4c90c81
creatorsName: cn=admin,dc=ldap,dc=zla
createTimestamp: 20070606122741Z
entryCSN: 20070606122741Z#000002#00#000000
modifiersName: cn=admin,dc=ldap,dc=zla
modifyTimestamp: 20070606122741Z
 
dn: sambaDomainName=sucrivoire,dc=ldap,dc=zla
objectClass: top
objectClass: sambaDomain
objectClass: sambaUnixIdPool
sambaDomainName: sucrivoire
sambaSID: S-1-5-21-1942017126-2896606091-2873900021
gidNumber: 1000
structuralObjectClass: sambaDomain
entryUUID: 105f4b38-a875-102b-9c11-9356b4c90c81
creatorsName: cn=admin,dc=ldap,dc=zla
createTimestamp: 20070606122741Z
uidNumber: 1003
entryCSN: 20070606123200Z#000003#00#000000
modifiersName: cn=admin,dc=ldap,dc=zla
modifyTimestamp: 20070606123200Z
 
dn: uid=rkonan,ou=Users,dc=ldap,dc=zla
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
objectClass: sambaSamAccount
cn: rkonan
sn: rkonan
givenName: rkonan
uid: rkonan
uidNumber: 1002
gidNumber: 513
homeDirectory: /home/rkonan
loginShell: /bin/bash
gecos: System User
structuralObjectClass: inetOrgPerson
entryUUID: aaf06088-a875-102b-9c12-9356b4c90c81
creatorsName: cn=admin,dc=ldap,dc=zla
createTimestamp: 20070606123200Z
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
displayName: System User
sambaSID: S-1-5-21-1942017126-2896606091-2873900021-3004
sambaPrimaryGroupSID: S-1-5-21-1942017126-2896606091-2873900021-513
sambaLMPassword: 345412C16EBF476FAAD3B435B51404EE
sambaAcctFlags: [U]
sambaNTPassword: 069CD2F741F9C2531A76994238C5EA5F
sambaPwdLastSet: 1181133154
sambaPwdMustChange: 1185021154
userPassword:: e1NTSEF9N3VOb3V6ZHdwL05kK0pnSE4waWIzdTFTQkRGaFJrRjA=
entryCSN: 20070606123234Z#000002#00#000000
modifiersName: cn=admin,dc=ldap,dc=zla
modifyTimestamp: 20070606123234Z

n°921248
rkonan
Posté le 09-06-2007 à 13:29:28  profilanswer
 

Tout semble aller mais sur un poste windows voici l'erreur que j'ai  
l'erreur suivante  s'est produite lors de la tentative de jonction que domaine "sucrivoie": Le domaine n'existe pas ou n'a pu être contacter.
Le domaine existe mais je n'arrive pas à le contacter, pourquoi donc ?

n°921358
rkonan
Posté le 09-06-2007 à 20:22:32  profilanswer
 

Mon message d'erreur à la jonction au domaine à changer:
[b][i]l'erreur suivante  s'est produite lors de la tentative de jonction que domaine "sucrivoire":  
Echec d'ouverture de session: nom d'utilisateur inconnu ou mot de passe incorrecte/[i]b]
Aide

n°921385
aknott31
Que la fête commence...
Posté le 09-06-2007 à 21:50:48  profilanswer
 

Ca semble ok pour le slapd.conf et le nsswitch.conf (encore que...)
j'ai souvent eu des problemes en utilisant la directive compat dans le nsswitch.conf
tu peux essayer de remplacer les 3 compat par files
passwd: files ldap
etc...
et relancer nscd
/etc/init.d/nscd restart

 

le getent passwd devrait faire apparaitre le login rkonan en plus de ceux du premier post.
si apres les modifs du nsswitch.conf et le redemarrage de nscd il n'y est toujours pas, de deux choses l'une
1. ton serveur ldap ne tourne pas
2. ta machine n'est pas connectée a la base ldap corectement.

 

on va deja s'assurer que le serveur tourne ou pas
un petit ps -ef |grep slapd doit te retourner la commande du serveur si il tourne.

 

si il tourne, poste le nssldap.conf (ou ldap.conf)
si il ne tourne pas lance le en mode debug :
/usr/sbin/slapd -d 10000 -h ldap:///
il doit afficher une floppée de lignes et ne PAS te rendre la main.
si il te rend la main poste les dernieres lignes...

 

on verra le reste apres...

 

EDIT:
je viens de voir que tu t'es fais fermer un topic sur ton net getlocalsid...
stp ne vas pas plus vite que la musique,
un probleme s'identifie et se resoud etape par etape.
avant de se demander si samba deconne assurons nous deja que le ldap lui il fonctionne tu ne crois pas?

 



Message édité par aknott31 le 09-06-2007 à 21:55:30

---------------
hebergez vos images

Aller à :
Ajouter une réponse
 

Sujets relatifs
[resolu] Samba PDC - Ouverture de session impossible hors LANQuestion sur l'authentification Samba
samba PDC : donnees sur le clientPDC samba -> Serveur WINS?
Conseils et aide config sambaUtilisation de open LDAP
PDC Samba LDAP - Authentification Unix[resolu ?] samba : algorithmic RID base pdc/ldap
samba pdc, ldap, le mappage entre les noms de comptes et les ID de secPDC samba-ldap
Plus de sujets relatifs à : PDC Samba LDAP


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR