Page 1 sur 2

Pb de jonction au domaine "CAMBAS"

Posté : jeu. 04 oct., 2007 10:26
par ezone
Bonjour a tous !

Tout d'abord merci de ce tuto qui m'a bien aidé ! :d:

LINUX - Monter un serveur Samba en PDC

Mais j'ai encore un gros problème !!

J'ai suivi ton tuto a la ligne, j'ai opté pour la deuxième méthode PDC avec LDAP. Tout ce passe bien, jusqu'a ce que je dois aujouté ma station XP dans le domaine. Windows me marque l'erreur suivante :
"...Pb de jonction au domaine "CAMBAS"... chemin réseau introuvable.."

Dans d'autre forum j'ai vu qu'il fallait changé une clé de la base de registre .. ce que j'ai fait mais ca na rien changé !! :grr:

Aurais tu une solution ?

J'ai installer mon serveur avec la version Desktop d'Ubuntu 7.04 puis j'ai installé le serveur ltsp (tuto de ubuntu.org)

Posté : jeu. 04 oct., 2007 10:57
par earendil
Salut,

pourrais tu poster tes fichiers de conf (pour samba, LDAP et nsswitch) ainsi que le log du serveur (dans /var/log/samba) ?

Posté : jeu. 04 oct., 2007 11:20
par ezone
Hello !

Merci de suivre encore ce topic, je ne suis pas devant ma machine ce matin (taf oblig :bad:) mais je le serais cette aprem.

A tout a l'heure :yeap:

Posté : jeu. 04 oct., 2007 13:46
par pepsilite
c'est quoi "LINUX"?

:mdr

Voici mes fichiers

Posté : jeu. 04 oct., 2007 15:19
par ezone
smb.conf

Code : Tout sélectionner

# Fichier de configuration pour Samba

# Partie Globale
[global]
workgroup = CAMBAS
netbios name = USERVER
server string = %h Server (Samba %v)
smb passwd file = /etc/samba/smbpasswd
domain master = Yes
local master = Yes
domain logons = Yes
os level = 95
passwd program = /usr/sbin/smbldap-passwd ?u %u
ldap passwd sync = Yes
passdb backend = ldapsam:ldap://127.0.0.1/tdbsam guest
ldap admin dn = cn=manager,dc=cambas,dc=org
ldap suffix = dc=cambas,dc=org
ldap group suffix = ou=Groups
ldap user suffix = ou=Users
ldap machine suffix = ou=Machines
add user script = /usr/sbin/smbldap-useradd -m "%u"
ldap delete dn = Yes
delete user script = /usr/sbin/smbldap-userdel "%u"
add machine script = /usr/sbin/smbldap-useradd -w "%u"
add group script = /usr/sbin/smbldap-groupadd -p "%g"
delete group script = /usr/sbin/smbldap-groupdel "%g"
add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
logon path = \\%L\profile\%U
logon drive = P:
logon home = \\%L\%U
logon script = \\%L\netlogon\logon.bat
guest ok = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
case sensitive = No
default case = lower
preserve case = yes
short preserve case = Yes
#character set = iso8859-1
#domain admin group = @admin
dns proxy = No
wins support = Yes
hosts allow = 10.1.0. 127. 
winbind use default domain = Yes
nt acl support = Yes
msdfs root = Yes
hide files = /desktop.ini/ntuser.ini/NTUSER.*/

printcap name = cups
printing = cups
#printer admin = root @Administrateurs
load printers = yes

##################################################################
# Partage pour le contrôleur de domaine
[netlogon]
comment = Repertoires scripts
path = /var/samba/netlogon
browseable = no
admin users = root
[profiles]
comment = Homes windows
path = /var/samba/profiles/%U
browseable = no
read only = no
##################################################################

##################################################################
# Partage des imprimantes
[printers]
path = /var/spool/cups/tmp
comment = All Printers
browseable = no
guest ok = no
create mode = 0700
writable = no
printable = yes
valid users = @test
printer admin = @test

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
guest ok = no
browseable = yes
read only = yes
valid users = @test
write list = root, @test
##################################################################

##################################################################
# Partage du répertoire personnel de l'utilisateur
[homes]
comment = Home Directories
browseable = no
writable = yes
hide files = /lost+found/

# Partage d'un autre répertoire
[commun]
path = /home/public
comment = Common Directories
browseable = yes
writable = yes
guest ok = no
valid users = @test
hide files = /lost+found/
create mask = 0770
directory mask = 0770
##################################################################

Posté : jeu. 04 oct., 2007 15:24
par ezone
ldap.conf

Code : Tout sélectionner

# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.9 2000/09/04 19:57:01 kurt Exp $
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
BASE	dc=cambas,dc=org
HOST 	127.0.0.1
#URI	ldap://ldap.example.com ldap://ldap-master.example.com:666
#SIZELIMIT	12
#TIMELIMIT	15
#DEREF		never

Posté : jeu. 04 oct., 2007 15:30
par ezone
slapd.conf

Code : Tout sélectionner

# 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

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/slapd.args

# Read slapd.conf(5) for possible values
loglevel        1024

# Where the dynamically loaded modules are stored
modulepath	/usr/lib/ldap
moduleload	back_bdb

# The maximum number of entries that is returned for a search operation
sizelimit 500

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# 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=cambas,dc=org"

# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
rootdn          "cn=manager,dc=cambas,dc=org"
rootpw		{SSHA}yvW8m2nrFh3lStqI84GlcBkNvF4wQSKY

# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0

# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057
# for more information.

# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500

# 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,shadowLastChange
        by dn="cn=manager,dc=cambas,dc=org" 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="dc=cambas,dc=org" by * read

# The admin dn has full write access, everyone else
# can read everything.
access to *
        by dn="cn=manager,dc=cambas,dc=org" 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=nodomain" 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"

Posté : jeu. 04 oct., 2007 15:31
par ezone
nsswitch.conf

Code : Tout sélectionner

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files ldap #compat
group:          files ldap #compat
shadow:         files ldap #compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Posté : jeu. 04 oct., 2007 15:39
par ezone
mon fichier log du serveur :

Code : Tout sélectionner

[2007/10/04 14:38:26, 3] smbd/oplock.c:init_oplocks(862)
  open_oplock_ipc: initializing messages.
[2007/10/04 14:38:26, 3] smbd/oplock_linux.c:linux_init_kernel_oplocks(260)
  Linux kernel oplocks enabled
[2007/10/04 14:38:26, 3] lib/access.c:check_access(312)
  check_access: no hostnames in host allow/deny list.
[2007/10/04 14:38:26, 0] lib/access.c:check_access(327)
  Denied connection from  (10.1.0.1)
[2007/10/04 14:38:26, 1] smbd/process.c:process_smb(1103)
  Connection denied from 10.1.0.1
[2007/10/04 14:38:26, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/10/04 14:38:26, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to 
[2007/10/04 14:38:26, 3] smbd/connection.c:yield_connection(76)
  yield_connection: tdb_delete for name  failed with error Record does not exist.
[2007/10/04 14:38:26, 3] smbd/server.c:exit_server_common(675)
  Server exit (connection denied)
[2007/10/04 14:38:26, 3] smbd/oplock.c:init_oplocks(862)
  open_oplock_ipc: initializing messages.
[2007/10/04 14:38:26, 3] smbd/oplock_linux.c:linux_init_kernel_oplocks(260)
  Linux kernel oplocks enabled
[2007/10/04 14:38:26, 3] lib/access.c:check_access(312)
  check_access: no hostnames in host allow/deny list.
[2007/10/04 14:38:26, 0] lib/access.c:check_access(327)

  Denied connection from  (10.1.0.1)
[2007/10/04 14:38:26, 1] smbd/process.c:process_smb(1103)
  Connection denied from 10.1.0.1
[2007/10/04 14:38:26, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/10/04 14:38:26, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to 
[2007/10/04 14:38:26, 3] smbd/connection.c:yield_connection(76)
  yield_connection: tdb_delete for name  failed with error Record does not exist.
[2007/10/04 14:38:26, 3] smbd/server.c:exit_server_common(675)
  Server exit (connection denied)
[2007/10/04 14:38:27, 3] smbd/oplock.c:init_oplocks(862)
  open_oplock_ipc: initializing messages.
[2007/10/04 14:38:27, 3] smbd/oplock_linux.c:linux_init_kernel_oplocks(260)
  Linux kernel oplocks enabled
[2007/10/04 14:38:27, 3] lib/access.c:check_access(312)
  check_access: no hostnames in host allow/deny list.
[2007/10/04 14:38:27, 0] lib/access.c:check_access(327)
  Denied connection from  (10.1.0.1)
[2007/10/04 14:38:27, 1] smbd/process.c:process_smb(1103)
  Connection denied from 10.1.0.1
[2007/10/04 14:38:27, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/10/04 14:38:27, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to 
[2007/10/04 14:38:27, 3] smbd/connection.c:yield_connection(76)
  yield_connection: tdb_delete for name  failed with error Record does not exist.
[2007/10/04 14:38:27, 3] smbd/server.c:exit_server_common(675)
  Server exit (connection denied)
[2007/10/04 14:38:27, 3] smbd/oplock.c:init_oplocks(862)
  open_oplock_ipc: initializing messages.
[2007/10/04 14:38:27, 3] smbd/oplock_linux.c:linux_init_kernel_oplocks(260)
  Linux kernel oplocks enabled
[2007/10/04 14:38:27, 3] lib/access.c:check_access(312)
  check_access: no hostnames in host allow/deny list.
[2007/10/04 14:38:27, 0] lib/access.c:check_access(327)
  Denied connection from  (10.1.0.1)
[2007/10/04 14:38:27, 1] smbd/process.c:process_smb(1103)
  Connection denied from 10.1.0.1
[2007/10/04 14:38:27, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/10/04 14:38:27, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to 
[2007/10/04 14:38:27, 3] smbd/connection.c:yield_connection(76)
  yield_connection: tdb_delete for name  failed with error Record does not exist.
[2007/10/04 14:38:27, 3] smbd/server.c:exit_server_common(675)
  Server exit (connection denied)

Posté : jeu. 04 oct., 2007 15:41
par ezone
:o: merci de votre aide !
Je suis novice dans le monde de linux :spo:

Posté : jeu. 04 oct., 2007 15:56
par Guix
Bon courage earendil :did:

Posté : jeu. 04 oct., 2007 17:12
par Dirk-Pitt
Ooops, je sors et vite :glups:

Posté : jeu. 04 oct., 2007 17:28
par Underground78
ezone a écrit ::o: merci de votre aide !
Je suis novice dans le monde de linux :spo:
C'est ta station Win XP qui a pour IP 10.1.0.1 ?

Posté : jeu. 04 oct., 2007 19:30
par ezone
Non c mon serveur !

Posté : jeu. 04 oct., 2007 20:40
par Underground78
Etrange, perso j'y connais rien à SMB mais ça me semble bizarre le "Connection denied from 10.1.0.1" surtout si 10.1.0.1 est l'ip du serveur ...

Posté : jeu. 04 oct., 2007 20:49
par ezone
Pour moi plus rien ne m'étonne :bad:
j'ai configuré mon serveur en IP fixe, mon serveur dhcp fonctionne bien car j'ai pour l'instant deux pc windows sur mon réseau et obtiennent bien leur bail d'ip a partir de mon serveur dhcp !

Posté : jeu. 04 oct., 2007 21:48
par earendil
Question : il y a quoi dans les fichiers de smbldap-tools ?

Posté : jeu. 04 oct., 2007 22:03
par ezone
Bonsoir,

Je pourrais te les envoyer demain matin pour 8h :o: !

Merci de votre aide et de me consacrer de votre temps ! :d:

Posté : ven. 05 oct., 2007 7:48
par ezone
Voici mon fichier smbldap.conf :

Code : Tout sélectionner

SID="S-1-5-21-764114760-1519278060-1707861267"

slaveLDAP="127.0.0.1"
slavePort="389"
masterLDAP="127.0.0.1"
masterPort="389"
ldapTLS="0"
verify="require"
suffix="dc=cambas,dc=org"
usersdn="ou=Users,${suffix}"
computersdn="ou=Machines,${suffix}"
groupsdn="ou=Groups,${suffix}"
idmapdn="ou=Idmap,${suffix}"
sambaUnixIdPooldn="cn=NextFreeUnixId,${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"

# Default mode used for user homeDirectory
userHomeDirectoryMode="700"

Posté : ven. 05 oct., 2007 7:49
par ezone
Voici mon fichier smbldap_bind.conf :

Code : Tout sélectionner

slaveDN="cn=manager,dc=cambas,dc=org"
slavePw="servlx"
masterDN="cn=manager,dc=cambas,dc=org"
masterPw="servlx"

Posté : ven. 05 oct., 2007 9:25
par earendil
Autres questions :
1. Tu as un firewall ? Si oui, tu pourrais me dire si tu autorise bien les connexion entrante pour les ports du LDAP et du SMB ?
2. Le mot de passe que je vois en clair dans smbldap_bind.conf est-il le même que celui masqué dans slapd.conf
3. Si tu tapes un getent group (sur le serveur), est-ce que tu vois bien les utilisateurs du domaine ?

Enfin, essaye de faire ça :

Arrêter samba

Code : Tout sélectionner

# /etc/init.d/samba/stop
Ajouter le mot de passe de l'administrateur de la base :

Code : Tout sélectionner

# smbpasswd -w tonmotdepasseroot
Démarre Saba

Code : Tout sélectionner

# /etc/init.d/samba start
Ensuite, donne moi le résultat de la commande

Code : Tout sélectionner

# net getlocalsid
(S'il y a un warning, ce n'est pas normal)

On verra pour la suite ;)

PS : Autre question :
le mot de passe de ton compte root est-il le même que celui de l'administrateur de LDAP ?

Posté : ven. 05 oct., 2007 9:42
par ezone
Bonjour earendil :o:

1. Je n'est pas installé ;de firewall (pas de connection Internet pour le moment)
2. Le mot de passe est bien le même (j'utilise le même mot de pass pour pa m'embrouiller)
3.Si je tape getent group en effet !! je ne vois pas mes utilisateurs du domaines !! :glups: (bizarrement il me semble que la premiere fois que j'ai fais ton tuto c t bon.. j'ai tout refais une deuxieme fois car j'avais fais tro de modif mais j'ai suivi ton tuto ligne par ligne...
4. Resultat du net getlocalsid

Code : Tout sélectionner

root@USERVER:~# net getlocalsid
[2007/10/05 09:34:24, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:25, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:26, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:27, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:28, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:29, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:30, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:31, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:32, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:33, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:34, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:35, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:36, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:37, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:38, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
[2007/10/05 09:34:39, 0] lib/smbldap.c:smb_ldap_setup_conn(638)
  ldap_initialize: Time limit exceeded
SID for domain USERVER is: S-1-5-21-764114760-1519278060-1707861267
root@USERVER:~# 
Bizarre car j'avais tapé cette commande pour avoir le sid a mettre dans smbldap.conf et je n'avais pas eu de message comme ci-dessus... comprends plus rien... :bad:

Posté : ven. 05 oct., 2007 9:59
par earendil
question, si tu fais un /etc/init/slapd restart, il démarre bien ou pas ?

5en gros, là, il arrive pas à contacter ton serveur LDAP, d'où les messages d'erreur ;)

Posté : ven. 05 oct., 2007 10:03
par ezone
Oui il demarre bien voici ce que j'ai dans mon terminal :

Code : Tout sélectionner

root@USERVER:~# sudo /etc/init.d/slapd restart
Stopping OpenLDAP: slapd.
Starting OpenLDAP: slapd.
root@USERVER:~# 

Posté : ven. 05 oct., 2007 10:06
par earendil
et dans le log, pas de message d'erreur vis à vis du démarrage de LDAP ?