logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 30-11-2017 11:23:16

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

[ABANDONNE] Comprendre le smb.conf et le corriger

Bonjour les amis

J'ai installé deux postes sous debian stretch et gnome  au boulot.
La secrétaire a W10 . Elle voit ma Debian et à l'intérieur l'imprimante (?) mais pas mes documents.
Elle ne voit pas l'autre debian de Judith ma collègue . J'ai installé samba client sur les deux Debian.
Je ne pige pas.

Merci de vos éclairages.

Dernière modification par calixtus06 (21-05-2018 22:36:45)


Il n'y a pas de mauvaises questions...

Hors ligne

#2 03-12-2017 14:47:30

Croutons
Membre
Distrib. : Debian12
Noyau : Linux 6.1.0-13-amd64
(G)UI : Fluxbox(NakeDeb)
Inscription : 16-12-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger


-->les cahiers du debutant<--      WikiDF-->Découvrir les principales commandes Linux<-- 
L' expérience, c'est le nom que chacun donne à ses erreurs. Oscar Wilde

Hors ligne

#3 03-12-2017 15:55:18

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Bonjour,

J'y étais  allé tu t'en doutes pour revisiter la question.

Avoue que pour un débutant même "débrouillé" comme moi certaines phrases refroidissent un peu:

Il peut être lancé soit soit par des daemons directs, par inetd qui est le plus sécurisé mais avec un temps de latence plus long



Prenons, pour exemplifier une configuration simple, une machine virtuelle sur laquelle il a été installé un serveur Debian.


Je ne trouve pas que la machine virtuelle soit une configuration aussi simple ..

Le nom du système hôte sur lequel va être installé samba :

  désolé encore mais pour moi le mot hôte a deux sens : client et serveur alors de qui parles t on ??

A priori le serveur ..

Pour la suite, il me semble qu'il y a plus simple :

https://debian-facile.org/viewtopic.php?id=6177

Or sous gnome quel est le gestionnaire de fichier ?

https://www.google.fr/search?q=gestionn … 89&bih=693

Du coup, y a t il une différence entre smb et samba ? Si oui peut il y avoir conflit ?

Merci pour la patience que chacun ici m'accorde

Dernière modification par calixtus06 (03-12-2017 15:57:15)


Il n'y a pas de mauvaises questions...

Hors ligne

#4 03-12-2017 16:45:45

anonyme
Invité

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Bonjour
samba est un logiel de partage compatible avec windows , le paquet "samba" est un méta paquet qui installe ce qui faut pour créer un serveur.
smb est un service lancé par samba

pour voir un partage il faut qu il soit créé , c'est la cas ? et sur quelle machine ?
des utilisateurs autorisés a voir ce partage ? et a lire et écrire ?
windows doit voir les clients debian stretch et vice versa les clients debian doivent voir windows
si tu vois l imprimante partagé c'est que le client fonctionne bien
si tu ne voit pas de dossier partagé c'est peut etre qu il n'existe pas

pour le pare-feu il faut ouvrir les ports sur chaque machine

faut peut etre lire un peu la documentation  roll

le wiki est un peu ancien mais très complet , il y a de la documentation sur debian et sur le net

ps: la ou est installé samba c'est le serveur ou sera le partage , les autres n'ont besoin que du client qui est installé par défaut sur debian
tu utilise l explorateur de fichier pour voir le réseau

tu a ce paquet sur gnome qui utilise le demon Avahi


Gnome-user-share est un petit paquet qui permet le partage de fichiers
facilement à l’aide de WebDAV. Les fichiers partagés sont publiés sur le
réseau par Avahi.
 




Avahi est un cadre applicatif sous licence LGPL pour le service de
découverte Multicast DNS. Il permet aux programmes de publier et découvrir
des services et des hôtes sur un réseau local sans configuration
spécifique. Par exemple, vous pouvez vous connecter à un réseau et
immédiatement trouver les imprimantes sur lesquelles imprimer, les
fichiers à ouvrir et les utilisateurs à joindre.

Ce paquet contient le démon Avahi qui représente votre machine sur le
réseau et permet à d'autres applications de publier et de résoudre des
enregistrements mDNS/DNS-SD.
 

Dernière modification par anonyme (03-12-2017 18:39:38)

#5 03-12-2017 22:07:31

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

pour voir un partage il faut qu il soit créé , c'est la cas ? et sur quelle machine ?

c'est un peu ma question . Dans synaptic j'ai installé samba . A mon domicile tout roule mais au boulot rien hormis cette imprimante en partage. Chez moi j'ai installé aussi des serveurs upnp et ça roule ..


Il n'y a pas de mauvaises questions...

Hors ligne

#6 04-12-2017 16:31:40

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

N'y a t il pas des erreurs dans la fiche péda ?

On me demande de transfrmer le nom de smb.conf et smb.conf-OLD puis d'éditer smb.conf ????

Du smb.conf est vide

pluma smb.conf-OLD


#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# Windows Internet Name Serving Support Section:
nico
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 192.168.70.0/50 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or 'domain logons' is set
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
;   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

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

[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

# 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

# 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



Qu'est ce que je dois dé commenter ?
Pourquoi créer un fichier/répertoire/groupe hypathie  alors qu'il existe un user: moi

echo $USERS

C'est quelque peu obscure pour moi


Il n'y a pas de mauvaises questions...

Hors ligne

#7 05-12-2017 15:33:51

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

https://debian-facile.org/images/file-R … 16c1461d66

file-Rf97949a859249c6f2ff74b16c1461d66

j'ai vu que nautilus-share était absent ..mais message d'erreur incomphéensible pour moi

Il n'y a pas de mauvaises questions...

Hors ligne

#8 18-12-2017 16:01:36

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

En prime le samba.conf
Si quelqu'un repère une incohérence ..

Merci d'avance

pluma /etc/samba/samba.conf




# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# Windows Internet Name Serving Support Section:
nico
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 192.168.70.0/50 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or 'domain logons' is set
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
;   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

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

[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

# 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

# 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
 


Il n'y a pas de mauvaises questions...

Hors ligne

#9 18-12-2017 16:30:20

anonyme
Invité

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Bonjour
pour ta question sur $user (ou $USER ) , ça correspond a ton nom d'utilisateur
pour moi par exemple , je mettrai "robert" a la place de $USER qui est mon nom d'utilisateur pour samba

sinon il te faut définir le réseau ou samba s'annonce ici :


#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
interfaces = 192.168.1.0/24 eth0
bind interfaces only = yes
 



tu enlève le ";" devant la ligne pour l' activer
192.168.1.0  correspond a ton réseau local (de 1 a 254 (0 et 255 est réservé )) , samba acceptera des clients de 192.168.1.1 a 192.168.1.254
nota: a adapter a ton réseau local pour les IP
eth0 correspond a la carte réseau ou samba écoute (a remplacer par le nom de ta carte )
tu active " bind interfaces only = yes"

un exemple d un partage configuré sur samba (mon dossier "public" dans le /home de "robert"


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

[homes]
comment = Documents Utiles
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S

[sharing]
path = /home/robert/Public
browseable = yes
writeable = yes
valid users = robert
write list = robert
create mask = 0770
directory mask = 700
 


ps: ce n'est qu un exemple , ci dessus
ce que tu dois créer c'est la partie "[sharing]" qui va définir ton partage

suivre le wiki et demander la ou tu comprends pas

nota: j'ai enlevé samba , un souci avec buster (et sid ) , j'ai pas cherché la raison  ..............
donc si tu teste , c'est Jessie ou Stretch comme debian a utiliser

Dernière modification par anonyme (18-12-2017 16:55:26)

#10 18-12-2017 23:53:32

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

nota: j'ai enlevé samba , un souci avec buster (et sid ) , j'ai pas cherché la raison  ..............
donc si tu teste , c'est Jessie ou Stretch comme debian a utiliser



J'ai enlevé samba et tout ce qui s'y rapporte puisque purge ne semblait pas suffire (??)
J'ai remis samba et des librairies,  logiciels qui s'appellent blabla samba, samba.bla bla bla . J'ai dû tomber sur le bon..
En retournant sur le dossier "documents" et en y faisant un clic droit je tombe sur "propriété" "partager" et non "document" menu "partage" ....Pourquoi ???

En tout cas là,  ça semble fonctionner ...
A vérifier demain depuis W10


Il n'y a pas de mauvaises questions...

Hors ligne

#11 19-12-2017 03:24:31

anonyme
Invité

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

je sais pas , mais avec l explorateur de fichier tu vois ton réseau ?
tu dois avoir un icone windows et Linux.
personnellement je l ai toujours utilisé entre clients Linux (sur win10 , la recherche du réseau (UPNP)et le groupe résidentiel est coupé ainsi que le partage "fichiers et imprimantes").
tu nous dira ce que ça donne smile

#12 21-12-2017 18:23:03

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

hello désolé du retard.
J'ai effacé samba puis l'ai remis pour la énième fois avec des paquets samba bidulle
J'ai fait clic droit sur un dossier Mais au lieu d'aller sur partage je suis allé sur "propriété" qui me proposait aussi un partage et bien là ça a fonctionné..
pour le moment je suis sous strech . Sous jessie ça  ne fonctionne toujours pas (???)

Il n'y a pas de mauvaises questions...

Hors ligne

#13 21-12-2017 18:24:29

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

anonyme a écrit :

je sais pas , mais avec l explorateur de fichier tu vois ton réseau ?
tu dois avoir un icone windows et Linux.
personnellement je l ai toujours utilisé entre clients Linux (sur win10 , la recherche du réseau (UPNP)et le groupe résidentiel est coupé ainsi que le partage "fichiers et imprimantes").
tu nous dira ce que ça donne smile


Oui je vois le réseau par contre je n'avais pas pensé à créer un serveur upnp.

Merci à toi


Il n'y a pas de mauvaises questions...

Hors ligne

#14 05-02-2018 15:39:07

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Hello je reviens vers vous avant que ma collègue ne me trucide :

file-R4f1fd3df88416a92e9bbe1def903b6f8

Pourtant le sigle de partage est indiqué....


Sur stretch ça passe , sur Jessie non, pourquoi ??

Dernière modification par calixtus06 (05-02-2018 16:31:04)


Il n'y a pas de mauvaises questions...

Hors ligne

#15 23-02-2018 00:03:01

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Croutons a écrit :



Désolé mais je trouve ce tuto des plus obscurs : un débutant devrait savoir ce qu'est un deamon, une machine virtuelle etc


Il n'y a pas de mauvaises questions...

Hors ligne

#16 23-02-2018 09:40:10

Croutons
Membre
Distrib. : Debian12
Noyau : Linux 6.1.0-13-amd64
(G)UI : Fluxbox(NakeDeb)
Inscription : 16-12-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Salut
installé 2 postes au boulot j'aurais pas osé
Probleme avec Samba quand ça fonctionne tu es content mais si ça marche po personne sait vraiment bien pourquoi
dur de trouvé de la doc très clair a ce sujet
je parle pour moi bien sur , mais sûrement qu'un admin doit s'en sortir mieux

-->les cahiers du debutant<--      WikiDF-->Découvrir les principales commandes Linux<-- 
L' expérience, c'est le nom que chacun donne à ses erreurs. Oscar Wilde

Hors ligne

#17 23-02-2018 18:02:11

anonyme
Invité

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Bonjour
non le wiki est pas obscur mais demande certainement une mise a jour (de 2014 )

par exemple ici


bind interfaces only = yes    # mettre "yes" pour utiliser le choix des interfaces (ligne au dessous)
 interfaces = 192.168.0.15/24
 


la première ligne détermine que seul la carte réseau précisé sera utilisé , ici eth0
et le seconde je vois plutot quelque chose du genre


bind interfaces only = yes
interfaces = 192.168.0.0/24 eth0
 



la carte réseau ou samba écoute sera "eth0" et sur toutes les IP  du réseau local "192.168.0.0/24"
pour vérifier ton smb.conf


testparm smb.conf
 



sinon les options start , stop , restart , status  avec systemd


service smbd status
 


nota: de mémoire le service ce nomme "smbd" a vérifier  roll

sur un raspberry pi3 avec raspbian stretch
quelques exemples
la fin de l'installation de samba


Ajout du groupe « sambashare » (GID 116)...
Fait.
Samba is not being run as an AD Domain Controller, masking samba-ad-dc-service.
Please ignore the following error about deb-systemd-helper not finding samba-ad-dc-service.
Created symlink /etc/systemd/system/multi-user.target.wants/nmbd.service → /lib/systemd/system/nmbd.service.
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service.
Traitement des actions différées (« triggers ») pour libc-bin (2.24-11+deb9u1) ...
Traitement des actions différées (« triggers ») pour systemd (232-25+deb9u1) ...
 


la commande "samba status"


service samba status
 


retour


● samba.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
 


les commandes disponnibles pour "service smbd xxx"


service smbd
 


retour


Usage: /etc/init.d/smbd {start|stop|reload|restart|force-reload|status}
 


état du service "smbd"


service smbd status
 


retour


● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-02-23 18:18:38 CET; 1min 47s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 2787 (smbd)
   Status: "smbd: ready to serve connections..."
   CGroup: /system.slice/smbd.service
           ├─2787 /usr/sbin/smbd
           ├─2788 /usr/sbin/smbd
           ├─2789 /usr/sbin/smbd
           └─2791 /usr/sbin/smbd

févr. 23 18:18:36 serveur2 systemd[1]: Starting Samba SMB Daemon...
févr. 23 18:18:37 serveur2 systemd[1]: smbd.service: Supervising process 2787 which is not our child. We'll most likely not notice when it exits.
févr. 23 18:18:38 serveur2 systemd[1]: Started Samba SMB Daemon.
 


ça demande un peu de travail pour bien le configurer  smile

voila le contenu de /etc/samba/smb.conf  aprés l'installation


#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or 'domain logons' is set
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
;   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

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

[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

# 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

# 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
 



il faut commencer par mettre a jour le "networking"
nota: c'est un exemple a adapter a ta configuration (je suis en dhcp , aucune importance samba va écouter sur eth0 de mon serveur de fichier , IP de 192.168.10.1 a 192.168.10.254 )


#### Networking ####

# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0    =>  le ;  indique que la ligne n'est pas active (comme le # )
interfaces = 192.168.10.0/24 eth0

bind interfaces only = yes
 



je teste mon fichier de configuration


testparm smb.conf
 


retour


Load smb config files from smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[homes]"
Processing section "[shares]"
WARNING: No path in service shares - making it unavailable!
NOTE: Service shares is flagged unavailable.
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
 


il me liste ce qui ne va pas

Dernière modification par anonyme (23-02-2018 18:52:42)

#18 23-02-2018 18:47:20

smolski
quasi...modo
Lieu : AIN
Distrib. : backports (buster) 10
Noyau : Linux 4.19.0-8-amd64
(G)UI : gnome
Inscription : 21-10-2008

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Ok merci anonyme !
Bon, on va mettre le tuto en obsolète en attendant que quelqu'un passe à le mettre à jour. smile

Dernière modification par smolski (23-02-2018 18:52:37)


saque eud dun (patois chtimi : fonce dedans)

Hors ligne

#19 23-02-2018 18:55:56

anonyme
Invité

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

on continue "après avoir fait "entrée"


Press enter to see a dump of your service definitions

# Global parameters
[global]
  bind interfaces only = Yes
  interfaces = 192.168.10.0/24 eth0
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
  usershare allow guests = Yes
  map to guest = Bad User
  obey pam restrictions = Yes
  pam password change = Yes
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  passwd program = /usr/bin/passwd %u
  server role = standalone server
  unix password sync = Yes
  dns proxy = No
  idmap config * : backend = tdb


[homes]
  comment = Home Directories
  browseable = No
  create mask = 0700
  directory mask = 0700
  valid users = %S


[shares]
  available = No


[printers]
  comment = All Printers
  path = /var/spool/samba
  browseable = No
  printable = Yes
  create mask = 0700


[print$]
  comment = Printer Drivers
  path = /var/lib/samba/printers
 


je vai commenter "syslog=0" avec un "#" devant le ligne , pour enlever cette erreur "WARNING: The "syslog" option is deprecated"

mon [shares] est vide  , aucun utilisateurs enregistrées dans samba

après modification le test de mon smb.conf


Load smb config files from smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[sharing]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
 


recapitulatif


Press enter to see a dump of your service definitions

# Global parameters
[global]
  bind interfaces only = Yes
  interfaces = 192.168.10.0/24 eth0
  log file = /var/log/samba/log.%m
  max log size = 1000
  panic action = /usr/share/samba/panic-action %d
  usershare allow guests = Yes
  map to guest = Bad User
  obey pam restrictions = Yes
  pam password change = Yes
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  passwd program = /usr/bin/passwd %u
  server role = standalone server
  unix password sync = Yes
  dns proxy = No
  idmap config * : backend = tdb


[homes]
  comment = Home Directories
  browseable = No
  create mask = 0700
  directory mask = 0700
  valid users = %S


[sharing]
  path = /home/pi/Public
  create mask = 0770
  directory mask = 0700
  read only = No
  valid users = pi
  write list = pi


[printers]
  comment = All Printers
  path = /var/spool/samba
  browseable = No
  printable = Yes
  create mask = 0700


[print$]
  comment = Printer Drivers
  path = /var/lib/samba/printers
 



créer un utilisateur


smbpasswd -help
 



When run by root:
    smbpasswd [options] [username]
otherwise:
    smbpasswd [options]

options:
  -L                   local mode (must be first option)
  -h                   print this usage message
  -s                   use stdin for password prompt
  -c smb.conf file     Use the given path to the smb.conf file
  -D LEVEL             debug level
  -r MACHINE           remote machine
  -U USER              remote username
extra options when run by root or in local mode:
  -a                   add user
  -d                   disable user
  -e                   enable user
  -i                   interdomain trust account
  -m                   machine trust account
  -n                   set no password
  -W                   use stdin ldap admin password
  -w PASSWORD          ldap admin password
  -x                   delete user
  -R ORDER             name resolve order
 



on va utiliser l'option -a avec l utilisateur "pi"


smbpasswd -a pi
New SMB password:
Retype new SMB password:
Added user pi.
 



dans partage "windows" je vois bien le partage "workgroup" mais j'ai la réponse lorsque je clique sur l'icone "workgroup"


L'obtention de la liste des partages du serveur a échoué : Connexion refusée
 



a suivre  wink

je me connecte d'un client debian stretch sur le rpi3 en stretch aussi (OS raspbian)
j'ai un dossier pour les imprimantes et le dossier partagé "sharing"
pas testé a partir de windows , je n'en ai pas
je peu regarder a partir de testing/sid si cela fonctionne
voila le syslog du serveur


Feb 23 20:38:38 serveur2 nmbd[516]: [2018/02/23 20:38:38.913737,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Feb 23 20:38:38 serveur2 nmbd[516]:   *****
Feb 23 20:38:38 serveur2 nmbd[516]:
Feb 23 20:38:38 serveur2 nmbd[516]:   Samba name server SERVEUR2 is now a local master browser for workgroup GROUPE on subnet 192.168.10.38
Feb 23 20:38:38 serveur2 nmbd[516]:
Feb 23 20:38:38 serveur2 nmbd[516]:   *****
 


toutes les machines en Buster/Sid  ne fonctionne pas sur un samba en stretch
voila si quelqu'un connait la solution

par contre impossible a partir du rpi3 de voir le partage (en local) mais ça c'est une autre histoire  tongue (OS raspbian)
nota: sur le serveur officiel j'ai supprimé samba (en debian stretch ) impossible de l'utiliser avec buster
je pense qu ils ont modifié quelque chose qui bloque sur buster/sid
je peu te donner la config basique de samba , j'utilise sur le bureau Mate , Caja pour visualiser le réseau (explorateur de fichier officiel de Mate)

ps: j'ai créé un dossier "shares" dans /home , mais plutot pour comprendre pourquoi en local (sur le serveur) je vois pas le partage samba
modifié WORKGROUP en GROUPE mais tout ça c'est sans importance .....  smile
avec jessie ça doit fonctionner je pense


service smbd status
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-02-23 20:38:05 CET; 32min ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 800 (smbd)
   Status: "smbd: ready to serve connections..."
   CGroup: /system.slice/smbd.service
           ├─ 800 /usr/sbin/smbd
           ├─ 801 /usr/sbin/smbd
           ├─ 802 /usr/sbin/smbd
           ├─ 837 /usr/sbin/smbd
           ├─ 866 /usr/sbin/smbd
           ├─ 871 /usr/sbin/smbd
           ├─ 872 /usr/sbin/smbd
           ├─ 874 /usr/sbin/smbd
           ├─ 880 /usr/sbin/smbd
           ├─1487 /usr/sbin/smbd
           ├─1502 /usr/sbin/smbd
           ├─1506 /usr/sbin/smbd
           └─1507 /usr/sbin/smbd

févr. 23 20:38:55 serveur2 smbd[865]: pam_unix(samba:session): session closed for user nobody
févr. 23 20:39:10 serveur2 smbd[874]: pam_unix(samba:session): session opened for user pi by (uid=0)
févr. 23 20:39:30 serveur2 smbd[880]: pam_unix(samba:session): session opened for user pi by (uid=0)
févr. 23 20:39:40 serveur2 smbd[885]: pam_unix(samba:session): session closed for user nobody
févr. 23 20:48:03 serveur2 smbd[1486]: pam_unix(samba:session): session closed for user nobody
févr. 23 20:48:16 serveur2 smbd[1493]: pam_unix(samba:session): session closed for user nobody
févr. 23 20:48:46 serveur2 smbd[1497]: pam_unix(samba:session): session closed for user nobody
févr. 23 20:49:21 serveur2 smbd[1501]: pam_unix(samba:session): session closed for user nobody
févr. 23 20:49:57 serveur2 smbd[1509]: pam_unix(samba:session): session opened for user pi by (uid=0)
févr. 23 20:50:25 serveur2 smbd[1509]: pam_unix(samba:session): session closed for user pi
 



la configuration actuelle


/etc/samba# testparm smb.conf

Load smb config files from smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[sharing]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
  bind interfaces only = Yes
  interfaces = 192.168.10.0/24 eth0
  workgroup = GROUPE
  log file = /var/log/samba/log.%m
  max log size = 1000
  panic action = /usr/share/samba/panic-action %d
  usershare allow guests = Yes
  usershare max shares = 10
  map to guest = Bad User
  obey pam restrictions = Yes
  pam password change = Yes
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  passwd program = /usr/bin/passwd %u
  server role = standalone server
  unix password sync = Yes
  dns proxy = No
  idmap config * : backend = tdb


[homes]
  comment = Home Directories
  browseable = No
  create mask = 0700
  directory mask = 0700
  valid users = %S


[sharing]
  path = /home/pi/shares
  create mask = 0770
  directory mask = 0700
  read only = No
  valid users = pi
  write list = pi


[printers]
  comment = All Printers
  path = /var/spool/samba
  browseable = No
  printable = Yes
  create mask = 0700


[print$]
  comment = Printer Drivers
  path = /var/lib/samba/printers
 

Dernière modification par anonyme (23-02-2018 21:17:37)

#20 24-02-2018 09:05:21

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Sur stretch j'ai juste eu à installer nautilus-share, à aller sur le dossier à partager et c'était bon. Pourquoi ai je tout ça à faire sur Jessie ?

Il n'y a pas de mauvaises questions...

Hors ligne

#21 24-02-2018 09:30:55

anonyme
Invité

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Bonjour
Pour samba utiliser les commandes addgroup ,adduser , mkdir ,smbpasswd avec l'option "-help" pour voir les détails
dans mon exemple au dessus j'utilise un utilisateur "pi" qui a un compte sur la machine dans le groupe "pi"
mais il est possible de mettre plusieurs utilisateurs , plusieurs groupes , plusieurs dossiers de partage avec les droits qui vont bien pour samba.
nota: pour un domaine je ne connais pas assez samba .....  roll

@smolski

pour ce problème entre stretch et buster un retour des utilisateurs (si un souci particulier pour moi tongue  ou qui touche tout le monde)
ce que j'ai remarqué , l icone du partage debian (nom d'ordinateur a disparu ) , sur le bureau avant (par l explorateur de fichier) on avait un icone windows et un icone debian
Maintenant uniquement l icone de windows avec le partage debian a l'intérieur (nom du serveur debian (nom de la machine))

ps: sur buster l icone "réseau windows" est vide (aucun partage)
sur stretch l'icone "réseau windows" =>"nomdupartage" => "nomduserveur"=>"mesdossiers"=>"mesfichiers"
ce qui donne dans ma configuration      réseau windows  => GROUPE => serveur2=> print$ et sharings

Bon je suis pas un spécialiste "Samba"  non plus   roll

#22 27-02-2018 16:28:56

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Bon c'est la cata, je ne parviens vraiment pas  à mettre mes fichiers en réseau pour que la secrétaire y accède:

nitroshare, samba, rien n'y fait

apt install samba



Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances      
Lecture des informations d'état... Fait
The following additional packages will be installed:
  attr libaio1 python-dnspython samba-dsdb-modules samba-vfs-modules tdb-tools
Paquets suggérés :
  bind9 bind9utils ctdb ldb-tools ntp | chrony smbldap-tools winbind ufw
Les NOUVEAUX paquets suivants seront installés :
  attr libaio1 python-dnspython samba samba-dsdb-modules samba-vfs-modules
  tdb-tools
0 mis à jour, 7 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 0 o/1 886 ko dans les archives.
Après cette opération, 14,6 Mo d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] o
Sélection du paquet python-dnspython précédemment désélectionné.
(Lecture de la base de données... 187051 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../0-python-dnspython_1.15.0-1_all.deb ...
Dépaquetage de python-dnspython (1.15.0-1) ...
Sélection du paquet tdb-tools précédemment désélectionné.
Préparation du dépaquetage de .../1-tdb-tools_1.3.11-2_i386.deb ...
Dépaquetage de tdb-tools (1.3.11-2) ...
Sélection du paquet samba précédemment désélectionné.
Préparation du dépaquetage de .../2-samba_2%3a4.5.12+dfsg-2+deb9u1_i386.deb ...
Dépaquetage de samba (2:4.5.12+dfsg-2+deb9u1) ...
Sélection du paquet attr précédemment désélectionné.
Préparation du dépaquetage de .../3-attr_1%3a2.4.47-2+b2_i386.deb ...
Dépaquetage de attr (1:2.4.47-2+b2) ...
Sélection du paquet libaio1:i386 précédemment désélectionné.
Préparation du dépaquetage de .../4-libaio1_0.3.110-3_i386.deb ...
Dépaquetage de libaio1:i386 (0.3.110-3) ...
Sélection du paquet samba-dsdb-modules précédemment désélectionné.
Préparation du dépaquetage de .../5-samba-dsdb-modules_2%3a4.5.12+dfsg-2+deb9u1_i386.deb ...
Dépaquetage de samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u1) ...
Sélection du paquet samba-vfs-modules précédemment désélectionné.
Préparation du dépaquetage de .../6-samba-vfs-modules_2%3a4.5.12+dfsg-2+deb9u1_i386.deb ...
Dépaquetage de samba-vfs-modules (2:4.5.12+dfsg-2+deb9u1) ...
Paramétrage de python-dnspython (1.15.0-1) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.24-11+deb9u1) ...
Paramétrage de libaio1:i386 (0.3.110-3) ...
Traitement des actions différées (« triggers ») pour systemd (232-25+deb9u1) ...
Paramétrage de tdb-tools (1.3.11-2) ...
update-alternatives: utilisation de « /usr/bin/tdbbackup.tdbtools » pour fournir « /usr/bin/tdbbackup » (tdbbackup) en mode automatique
Traitement des actions différées (« triggers ») pour man-db (2.7.6.1-2) ...
Paramétrage de samba (2:4.5.12+dfsg-2+deb9u1) ...
Samba is not being run as an AD Domain Controller, masking samba-ad-dc-service.
Please ignore the following error about deb-systemd-helper not finding samba-ad-dc-service.
Created symlink /etc/systemd/system/multi-user.target.wants/nmbd.service → /lib/systemd/system/nmbd.service.
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service.
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2018-02-27 16:23:59 CET; 19ms ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 16210 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 16210 (code=exited, status=1/FAILURE)

févr. 27 16:23:58 debiannicolas systemd[1]: Starting Samba SMB Daemon...
févr. 27 16:23:59 debiannicolas systemd[1]: smbd.service: Main process exit…URE
févr. 27 16:23:59 debiannicolas systemd[1]: Failed to start Samba SMB Daemon.
févr. 27 16:23:59 debiannicolas systemd[1]: smbd.service: Unit entered fail…te.
févr. 27 16:23:59 debiannicolas systemd[1]: smbd.service: Failed with resul…e'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: erreur de traitement du paquet samba (--configure) :
 le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1
Paramétrage de samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u1) ...
Paramétrage de attr (1:2.4.47-2+b2) ...
Paramétrage de samba-vfs-modules (2:4.5.12+dfsg-2+deb9u1) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.24-11+deb9u1) ...
Traitement des actions différées (« triggers ») pour systemd (232-25+deb9u1) ...
Des erreurs ont été rencontrées pendant l'exécution :
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@debiannicolas:/home/nicolas#
 



file-R1f34dfdf06ae74e1d4ca543397cad94d

Des idées ?


Il n'y a pas de mauvaises questions...

Hors ligne

#23 27-02-2018 16:49:51

Severian
Membre
Distrib. : Debian GNU/Linux 9.4 (stretch)
Noyau : Linux 4.14.0-0.bpo.3-amd64
(G)UI : Openbox 3.6.1-4
Inscription : 13-12-2014

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

bonsoir
autant commencer par la base
que renvoie la commande

smbd -V



tu trouveras beaucoup de tuto pour configurer samba, mais il faut bien faire attention à la version que tu utilise

Hors ligne

#24 27-02-2018 17:04:34

calixtus06
Membre
Distrib. : Librazik 4
Noyau : 5.10.0-14-lzk-bl-amd64
(G)UI : mate
Inscription : 25-03-2016

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

Bonjour Severian,

Pour être précis, nous  travaillons sous deux debian l'une est sous jessie/ gnome l'autre sous stretch/ gnome/ 32 bits . Actuellement les deux bécannes sont injoignables par notre secrétaire qui est sous W10.

Samba ou autre, il nous faut un moyen de donner accès à nos fichiers. Un grand merci d'avance. Nous sommes vraiment très emmerdés.

smbd -V


Version 4.5.12-Debian
root@debiannicolas:/home/nicolas#



là je t'écris de stretch

Dernière modification par calixtus06 (27-02-2018 17:05:34)


Il n'y a pas de mauvaises questions...

Hors ligne

#25 27-02-2018 17:50:13

Severian
Membre
Distrib. : Debian GNU/Linux 9.4 (stretch)
Noyau : Linux 4.14.0-0.bpo.3-amd64
(G)UI : Openbox 3.6.1-4
Inscription : 13-12-2014

Re : [ABANDONNE] Comprendre le smb.conf et le corriger

je ne suis pas un spécialiste de samba, mais voila ce que j'ai fais pour partager mes fichiers sur mon réseau privé
j'ai installe samba et smbclient (smbclient est plus pour voir les partages des autres pcs)

pour la configuration de smb.conf

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP
   netbios name = PcDebian
   hosts allow = 192.168.1.0/24
   force user = sev

#### Debugging/Accounting ####

   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d

####### Authentication #######

   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

#======================= Share Definitions =======================
[smb-docs]
   path = /media/docs
   guest ok = yes
   browseable = yes
   read only = no
   writable = yes
   create mask = 0750
   directory mask = 0700
[smb-media]
   path = /media/Divertissement
   guest ok = yes
   browseable = yes
   read only = no
   writable = yes
   create mask = 0750
   directory mask = 0700
 


(j'y suis allé assez simplement en fait, peu de différences avec les fichiers de config d'origine)

un tuto qui peu t'être utile
https://linuxconfig.org/how-to-configur … etch-linux

Hors ligne

Pied de page des forums