Samba : Partage sous debian [Résolu]

Merci fabien493 pour ta clairvoyance!!!

Je t’en pris !

je ne suis qu’un simple chieur, qui souhaite comprendre comment ça fonctionne avant de savoir à quoi sa sert ! lol

Amicalement,
Fab

Voilà mes données Fabien493 : (je suis “sous” Gnome)

:arrow_right: Cobra:/var/log/samba# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all – anywhere anywhere
ACCEPT icmp – anywhere anywhere
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp – anywhere anywhere tcp dpt:ftp-data
ACCEPT tcp – anywhere anywhere tcp dpt:ftp
ACCEPT tcp – anywhere anywhere tcp dpt:www
ACCEPT tcp – anywhere anywhere tcp dpt:4662
ACCEPT udp – anywhere anywhere udp dpt:4662
ACCEPT udp – anywhere anywhere udp dpt:4672
ACCEPT udp – anywhere anywhere udp dpt:4665
ACCEPT tcp – anywhere anywhere tcp dpt:4661
ACCEPT udp – anywhere anywhere udp dpt:4672
ACCEPT tcp – anywhere anywhere tcp dpt:4711
ACCEPT tcp – anywhere anywhere tcp dpt:4712
ACCEPT tcp – anywhere anywhere tcp dpt:ssh
ACCEPT tcp – anywhere anywhere tcp dpt:ssh
ACCEPT tcp – anywhere anywhere tcp dpt:51413
ACCEPT tcp – anywhere anywhere tcp dpt:12000
ACCEPT tcp – anywhere anywhere tcp dpt:netbios-ns
ACCEPT tcp – anywhere anywhere tcp dpt:netbios-dgm
ACCEPT tcp – anywhere anywhere tcp dpt:netbios-ssn
ACCEPT udp – anywhere anywhere udp dpt:netbios-ns
ACCEPT udp – anywhere anywhere udp dpt:netbios-dgm
ACCEPT udp – anywhere anywhere udp dpt:netbios-ssn
ACCEPT tcp – anywhere anywhere tcp dpt:microsoft-ds
ACCEPT udp – anywhere anywhere udp dpt:microsoft-ds

Chain FORWARD (policy DROP)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp – anywhere anywhere tcp spt:netbios-ssn
ACCEPT tcp – anywhere anywhere tcp spt:netbios-dgm
ACCEPT tcp – anywhere anywhere tcp spt:netbios-ns
ACCEPT tcp – anywhere anywhere tcp spt:microsoft-ds
ACCEPT udp – anywhere anywhere udp spt:microsoft-ds


C’est pas un modèle du genre, j’arrête pas de bidouiller…

Pour la suite précisions :
192.168.1.1 : Livebox
192.168.1.11 : PC Debian relié rj45 à la Livebox
192.168.1.22 : PC XP relié en WIFI à la Livebox
192.168.1.10 : PC Vista (portable) relié en WIFI à la Livebox

:arrow_right: Le fichier interfaces :

Cobra:/var/log/samba# cat /etc/network/interfaces

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

#allow-hotplug eth0
#iface eth0 inet dhcp
#iface eth0 inet ppp
#provider

auto eth0
iface eth0 inet static
address 192.168.1.11
netmask 255.255.255.0
gateway 192.168.1.1

up route add 192.168.1.22 gw 192.168.1.1
up route add 192.168.1.10 gw 192.168.1.1


:arrow_right: l’ ifconfig
Cobra:/var/log/samba# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0b:6a:4b:81:2f
inet adr:192.168.1.11 Bcast:192.168.1.255 Masque:255.255.255.0
adr inet6: fe80::20b:6aff:fe4b:812f/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2318475 errors:0 dropped:0 overruns:0 frame:0
TX packets:1470738 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:3328243598 (3.0 GiB) TX bytes:120581063 (114.9 MiB)
Interruption:19 Adresse de base:0xd400

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:677 errors:0 dropped:0 overruns:0 frame:0
TX packets:677 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:499107 (487.4 KiB) TX bytes:499107 (487.4 KiB)


:arrow_right: Les dernières lignes du /var/log/samba/log.ffff_192.168.1.22

[2009/04/06 07:26:52, 0] lib/access.c:check_access(410)
Denied connection from __ffff_192.168.1.22 (::ffff:192.168.1.22)
[2009/04/06 07:26:52, 1] smbd/process.c:process_smb(1539)
Connection denied from ::ffff:192.168.1.22
[2009/04/06 07:26:52, 0] lib/access.c:check_access(410)
Denied connection from __ffff_192.168.1.22 (::ffff:192.168.1.22)
[2009/04/06 07:26:52, 1] smbd/process.c:process_smb(1539)
Connection denied from ::ffff:192.168.1.22
[2009/04/06 07:26:52, 0] lib/access.c:check_access(410)
Denied connection from __ffff_192.168.1.22 (::ffff:192.168.1.22)
[2009/04/06 07:26:52, 1] smbd/process.c:process_smb(1539)
Connection denied from ::ffff:192.168.1.22
[2009/04/06 07:26:52, 0] lib/access.c:check_access(410)
Denied connection from __ffff_192.168.1.22 (::ffff:192.168.1.22)
[2009/04/06 07:26:52, 1] smbd/process.c:process_smb(1539)
Connection denied from ::ffff:192.168.1.22


:arrow_right: Le résultat de Démarrer, exécuter, cmd, Entrer , net share sur l’XP:
Nom partage Ressource Remarque


IPC$ IPC distant

print$ C:\WINDOWS\system32\spool\drivers

                                         Pilotes d'imprimantes             

ADMIN$ C:\WINDOWS Administration
distance

C$ C:\ Partage par d‚faut

Administrateur

         C:\Documents and Settings\Administrateur

C C:\

M. tsinapah C:\Documents and Settings\Administrateur\Mes documents\M. tsinapah

mes doc pc phil

         C:\Documents and Settings\Administrateur\Mes documents\M. tsinapah\mes doc pc phil

Mes documents

         C:\Documents and Settings\Administrateur\Mes documents

SharedDocs C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS

Test C:\Test

Imprimante Microsoft Document Ima Mis en f Microsoft Office Document Image Wr

Imprimante2 192.168.1.55 Mis en f Dell Laser Printer 3000cn PCL6

La commande s’est termin‚e correctement.


Je crois que je n’ai rien oublié…
Une chose encore :
Je ne peux pas atteindre mes fichiers XP via le pc Debian (part partage windows) quand je laisse le message d’erreur de l’XP ouvert après un \192.168.1.11 (“Le nom réseau spécifié…”)…

Très amicalement serviteur
Tsinapah

c’est un peut le bordel !

je vais prendre ma douche et je reviens.

fab

Bon,

On commence :

Tout d’abord, tu vas gentiment, tapez la commande :

[code]
Iptables -F
Iptables –X

[code]
Bon, Samba et ssh devrait marcher. Et s’il te plais, vire moi cette route qui sert à rien, je t’en supplies !

Maintenant tu vas me faire le plaisir, d’aller apprendre par coeur « L’OSI », et tu me dira, dans qu’elle couche se situe le problème que tu avais.

Ha j’allais oublier, ouvre le fichier /etc/services qui se trouve sur ta debian, et mémorise principalement les ports :20, 21, 22, 80, 443, et 53 et à quoi ils corresponds.
(Ne modifie rien dans ce fichier)

Sache que les iptables, est une chose de vraiment compliqué et simple à la fois, même moi je ne comprends pas tout sur les iptables. Maintenant tu ne penses pas qu’il y a un problème ? :

Chain INPUT (policy DROP) > tu DROP tout ce qui arrive sur le serveur par défaut
ACCEPT all – anywhere anywhere > Tu accepte tout ce qui arrive sur le serveur (sur tout les ports)

Et voila encore un tuto à faire, j’aurais jamais le temps de tout faire lol.

Si tu as le moindre problème hésite pas, je suis la pour ça !

Amicalement,
Fabien493

p.s : peut tu changer le titre du topic, en :" Partages sous Debian"

J’ai plu de connection à la Livebox ni aux pcs sur le pc Debian après avoir entré
Iptables -F
Iptables –X

ping 192.168.1.1 : connect: Netxwork is unreachable…

Ca m’apprendra à taper des commandes sans les comprendre…

ok, je m’excuse c’est ma faute, tape :

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT

et tout re-fonctionne.

En fait, tu as paramettré les INPUT et OUTPUT en DROP, donc en supprimant les Iptables par la commande :
iptables -F
iptables -X
Cela ne supprime pas les policys que tu as mis.

J’ai oublié sur le coup, vraiment désolé !
Fab

ok ca re marche …merci
et j’ai toujours le même message de la par du pc XP quand je fait \192.168.1.11…

quand tu fait un \ipdudubian sur le poste XP, ça te dit toujours

???

post moi :

cat /var/log/samba/log.smbd

fab

Voilà (la fin…)
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/04/06 10:01:14, 0] smbd/server.c:main(1213)
smbd version 3.2.5 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/04/06 10:01:14, 0] lib/interface.c:load_interfaces(520)
ERROR: Could not determine network interfaces, you must use a interfaces config line
[2009/04/06 10:25:52, 0] smbd/server.c:main(1213)
smbd version 3.2.5 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008

Je vais devoir m’absenter dans 10 minutes pour 2h30env à tout à l’heure

Ton problème est LA !

Apparemment, Samba n’arrive pas à déterminer ton interface réseau.

C’est un problème super compliqué, et même moi je ne sais si je peut résoudre ce problème la…

je pense que tu as du couiller quelque part pendant l’install, ou quand tu as modifié ton interface ETH0.

je t’ai envoyé un Message privé.

Amicalement,
Fabien493

ajoutes une ligne
interfaces = eth0
dans /etc/samba/smb.conf
pour les interfaces d’écoute

Par ailleurs, poste le résultat de
netstat -tpl
pour voir si samba écoute sur toutes les interfaces

Merci pour ta réponse fran.b.

personnellement, je n’ai pas spécifié d’interface dans mon smb.conf, donc j’y crois pas trop.

Tsinapah, essaye la solution de fran.b, et post ton smb.conf, stp.

Fabien493

Voilà fran.b :
Cobra:/home/phm# netstat -tpl
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 :41441 : LISTEN 1858/rpc.statd
tcp 0 0 :sunrpc : LISTEN 1847/portmap
tcp 0 0 localhost:ipp : LISTEN 2258/cupsd
tcp 0 0 localhost:smtp : LISTEN 2525/exim4
tcp6 0 0 [::]:netbios-ssn [::]:
LISTEN 2554/smbd
tcp6 0 0 localhost:5900 [::]:
LISTEN 2841/vino-server
tcp6 0 0 localhost:ipp [::]:* LISTEN 2258/cupsd
tcp6 0 0 [::]:microsoft-ds [::]:* LISTEN 2554/smbd

Merci à toi

Fabien, voici la fin du smb.conf (tu veux vraiment tout ?..) j’ai vu des lignes commentées (:wink: concernant Samba !!!

#======================= Share Definitions =======================

wins support = no
[homes]
comment = Home Directories
browseable = no

By default, the home directories are exported read-only. Change the

next parameter to ‘no’ if you want to be able to write to them.

read only = yes

File creation mask is set to 0700 for security reasons. If you want to

create files with group=rw permissions, set next parameter to 0775.

create mask = 0700

Directory creation mask is set to 0700 for security reasons. If you want to

create dirs. with group=rw permissions, set next parameter to 0775.

directory mask = 0700

By default, \server\username shares can be connected to by anyone

with access to the samba server.

The following parameter makes sure that only “username” can connect

to \server\username

This might need tweaking when using external authentication schemes

valid users = %S

Un-comment the following and create the netlogon directory for Domain Logons

(you need to configure Samba to act as a domain controller too.)

;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes
; share modes = no

Un-comment the following and create the profiles directory to store

users profiles (see the “logon path” option above)

(you need to configure Samba to act as a domain controller too.)

The path below should be writable by all users so that their

profile directory may be created the first time they log on

;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

[partages]
comment = All Partages
browseable = yes
path = /mnt/partages

Windows clients look for this share name as a source of downloadable

printer drivers

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no

Uncomment to allow remote administration of Windows print drivers.

You may need to replace ‘lpadmin’ with the name of the group your

admin users are members of.

Please note that you also need to set appropriate Unix permissions

to the drivers directory for these users to have write rights in it

; write list = root, @lpadmin

A sample share for sharing your CD-ROM with others.

;[cdrom]
; comment = Samba server’s CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes

The next two parameters show how to auto-mount a CD-ROM when the

cdrom share is accesed. For this to work /etc/fstab must contain

an entry like this:

/dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0

The CD-ROM gets unmounted automatically after the connection to the

If you don’t want to use auto-mounting/unmounting make sure the CD

is mounted on /cdrom

; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom

interfaces = eth0 # :smt006 <<<<<<<< ajout franc.b

[phm]
path = /home/phm
available = yes
browsable = yes
public = yes
writable = yes


ensuite j’ai fait un /etc/init.d/samba restart

J’ai rééssayé \192.168.1.11 … même punition

Amicalement

Lol, Merci pour ton bout de smb.conf…

je t’explique, le problème peut venir de samba, sauf que voila, à partir du moment ou tu tape \ipdudebian tu as un erreur d’accès, pas de partages, ni de compte. Juste une toutes petite erreur d’accès.

Après l’ajout de interfaces = eth0 dans le fichier smb.conf, ta restarté samba, mais que te dit le fichier de log de smbd ?

cat /var/log/samba/log.smbd

amicalement,
fab

Voilà :
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/04/06 10:01:14, 0] lib/interface.c:load_interfaces(520)
ERROR: Could not determine network interfaces, you must use a interfaces config line
[2009/04/06 10:25:52, 0] smbd/server.c:main(1213)
smbd version 3.2.5 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/04/06 14:50:50, 0] smbd/server.c:main(1213)
smbd version 3.2.5 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/04/06 14:50:50, 0] param/loadparm.c:lp_do_parameter(7214)
Global parameter interfaces found in service section!

bas c’est bon ça doit fonctionner maintenant.

re-teste depuis ton PC XP.

fab

Nan !
Même chose … par contre \192.168.1.10 (c’est le portable Vista) marche nickel Grrrrr !

oulala !! vista ça marche mais pas XP ?

Pourtant Vista est réputé pour pas marcher ! lol

Test ça sous XP :
Démarrer > Panneau de configuration > connexions réseaux >
Double clique, sur connexion réseau sans fil > propriétés
et regarde si tu as bien :" Partage de fichiers et d’imprimantes pour les réseaux microsoft."

Profites en, pour désactiver le par-feu, et éventuellement les antivirus, le temps du test.