#1 Le 24/05/2021, à 18:58
- Maminette
[RÉSOLU] Impossible de configurer mon réseau local
Bonsoir,
Je suis sous 18.04, et je suis toujours aussi débutante. Je n'arrive toujours pas à être vue par mon Macbook, J'ai installé samba et system config samba par la documentation, mais rien ne fonctionne !!! Ce sont mes disques périphériques que je veux partager : je les vois du Macbook, mais je ne peux les ouvrir et j'ai le message suivant : le disque est introuvable.
J'ajoute que le partage de mes disques ne reste pas permanent.
Je vous remercie par avance pour votre aide.
Maminette
Dernière modification par Maminette (Le 02/06/2021, à 17:15)
Hors ligne
#2 Le 25/05/2021, à 20:03
- LRDP
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonsoir,
il faudrait indiquer plus de renseignements, notamment le fichier de configuration de Samba (/etc/samba/smb.conf). Les partages de disques ont-ils étés faits par le Superutilisateur (Nautilus-share) ? En principe, il faut créer les utilisateurs (avec mots de passe) qui vont se connecter par le réseau sur votre machine comme indiqué dans la documentation de Samba; regardez aussi la documentation de System-config-samba et Smb.conf (le titre doit être "fichier de configuration Samba, si ma mémoire est bonne).
Bon courage, c'est souvent assez ardu, depuis qu'on a augmenté la sécurité des réseaux.
Ubuntu Maté 20.04.6. Garuda Linux Dragonized ARCH Linux i3
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti
Hors ligne
#3 Le 26/05/2021, à 19:55
- Maminette
Re : [RÉSOLU] Impossible de configurer mon réseau local
Merci LRDP,
Il me semble que tu as déjà essayé de m'aider.
Voici le fichier demandé :
#
# 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
client max protocol = NT1
# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)
# 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
username map = /etc/samba/smbusers
security = user
; encrypt passwords = yes
guest ok = yes
guest account = nobody
#======================= Share Definitions =======================
# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[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.
# Un-comment the following parameter to make 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
[disk1]
path = /media/toto/disk1
writeable = yes
; browseable = yes
guest ok = yes
[disk2]
path = /media/toto/disk2
writeable = yes
; browseable = yes
guest ok = yes
[disk3]
path = /media/toto/disk3
writeable = yes
; browseable = yes
guest ok = yes
[disk4]
path = /media/toto/disk4
writeable = yes
; browseable = yes
guest ok = yes
[disk5]
path = /media/toto/disk5
writeable = yes
; browseable = yes
guest ok = yes
J'ai fait le partage de disques par caja-share (je suis sous MATE), mais il ne tient pas malgré mes multiples essais.
Merci pour ton aide.
Hors ligne
#4 Le 26/05/2021, à 20:19
- LRDP
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonsoir,
je reçois tout juste votre réponse. Je préfère dire de suite que je ne suis pas expert en réseaux, mais j'arrive à partager certains périphériques avec Samba sur mon réseau local depuis des années et j'ai eu la surprise de voir que ce partage reste possible sur la version 20.04, même sans créer de liste d'utilisateurs ni de mot de passe, ce qui est à priori pas possible avec les versions récentes de Samba (Samba 4 si je ne m'abuse). Votre SMB.conf parait convenable (je vois même que vous avez du ajouter la ligne "client max protocol = NT1" qui est indiquée dans la documentation, ce qui n'est pas écrit par défaut à l'installation). Par contre, il faut probablement lister les utilisateurs comme décrit sur la documentation avec attribution de mot de passe, pour faire fonctionner le réseau Samba. Avez-vous fait un "testparm -s" (renvoyez le résultat de cette commande). Si le partage des disques ne tient pas, (très bizarre !), peut-être installez cifs-utils (indiqué dans la documentation) cela devrait stabiliser le partage (à faire par Caja-share, étant sur Mate, comme moi d'ailleurs, toujours en superutilisateur).
J’espère que vous pourrez vous dépatouiller de la situation, peut-être avec l'aide d'un bon administrateur réseau de la communauté.
Ubuntu Maté 20.04.6. Garuda Linux Dragonized ARCH Linux i3
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti
Hors ligne
#5 Le 26/05/2021, à 20:45
- iznobe
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonsoir ,
peux tu donner le retour des commandes suivantes stp :
cat /etc/fstab
lsblk -fe7 -o+size
indiquez les partitions sur lesquels sont les dossiers contenant les fichiers a partager et bien sur les dossiers en question .
le ou les disques sur le(s)quel(s) sont les fichiers sont des disques internes ou amovibles ?
dans ton fichier de configuration samba , on note que devant chaque partage il y a la ligne browsable qui commence par un " ; " , ceci empeche ton macbook de naviguer a travers les dossiers , ce qui est peut etre la cause du probleme .
Dernière modification par iznobe (Le 26/05/2021, à 20:51)
retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne
#6 Le 27/05/2021, à 13:17
- Maminette
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour iznobe,
Merci pour ton message.
Voici le premier fichier demandé :
sdf@sdf-DH310V2:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=21e34076-c5b4-41d6-823e-60c336a5505d / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda3 during installation
#UUID=34d67118-0450-4505-87dd-972b7e35ff79 /boot ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=f48201ee-daec-45c5-8878-6dafa7e156d0 none swap sw 0 0
UUID=34d67118-0450-4505-87dd-972b7e35ff79 /boot ext4 defaults 0 2
/dev/nvme0n1 /media/sdf/Media ext4 rw,nosuid,nodev,relatime 0 0
sdf@sdf-DH310V2:~$
deuxième fichier demandé
lsblk -fe7 -o+size
NAME FSTYPE LABEL UUID MOUNTPOINT SIZE
sda 894,3G
├─sda1 ext4 21e34076-c5b4-41d6-823e-60c336a5505d / 878,7G
├─sda2 1K
├─sda3 ext4 34d67118-0450-4505-87dd-972b7e35ff79 /boot 5,9G
└─sda5 swap f48201ee-daec-45c5-8878-6dafa7e156d0 [SWAP] 9,7G
sdb 3,7T
└─sdb1 ext4 mybook 61d75c65-5b46-42a7-a8e4-7cf97ce703e6 /media/sdf/ 3,7T
sdc 3,7T
├─sdc1 vfat EFI 67E3-17ED 200M
└─sdc2 hfsplus WD4T d85deb20-d778-3632-8e58-a18a4f3887af /media/sdf/ 3,7T
sdd 5,5T
└─sdd1 ext4 sylvia02 833bd2d5-c125-4018-be12-aa4d9e336594 /media/sdf/ 5,5T
sde 5,5T
└─sde1 ext4 sylvia03 ddfacd6d-9b53-445b-a6a3-38098eaf772b /media/sdf/ 5,5T
nvme0n1 ext4 Media b898ec4b-73b8-4b39-97c1-79b5de689353 /media/sdf/ 1,8T
sdf@sdf-DH310V2:~$
le disque Media est interne SSD M2 sans lettre sdx
sdb sdc sdd sde sont des disques externes amovibles.
Je vais retirer les ; et je te tiens au courant.
Merci et bonne journée.
Hors ligne
#7 Le 27/05/2021, à 13:19
- xubu1957
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour,
Comme demandé dans le premier message du tutoriel Retour utilisable de commande
Pour ajouter toi-même les balises code à ton précédent message #6 :
Cliquer sur le lien « Modifier » en bas à droite du message
Sélectionner le texte
Cliquer sur le <> de l'éditeur de message
sdf@sdf-DH310V2:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=21e34076-c5b4-41d6-823e-60c336a5505d / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda3 during installation
#UUID=34d67118-0450-4505-87dd-972b7e35ff79 /boot ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=f48201ee-daec-45c5-8878-6dafa7e156d0 none swap sw 0 0
UUID=34d67118-0450-4505-87dd-972b7e35ff79 /boot ext4 defaults 0 2
/dev/nvme0n1 /media/sdf/Media ext4 rw,nosuid,nodev,relatime 0 0
sdf@sdf-DH310V2:~$
lsblk -fe7 -o+size
NAME FSTYPE LABEL UUID MOUNTPOINT SIZE
sda 894,3G
├─sda1 ext4 21e34076-c5b4-41d6-823e-60c336a5505d / 878,7G
├─sda2 1K
├─sda3 ext4 34d67118-0450-4505-87dd-972b7e35ff79 /boot 5,9G
└─sda5 swap f48201ee-daec-45c5-8878-6dafa7e156d0 [SWAP] 9,7G
sdb 3,7T
└─sdb1 ext4 mybook 61d75c65-5b46-42a7-a8e4-7cf97ce703e6 /media/sdf/ 3,7T
sdc 3,7T
├─sdc1 vfat EFI 67E3-17ED 200M
└─sdc2 hfsplus WD4T d85deb20-d778-3632-8e58-a18a4f3887af /media/sdf/ 3,7T
sdd 5,5T
└─sdd1 ext4 sylvia02 833bd2d5-c125-4018-be12-aa4d9e336594 /media/sdf/ 5,5T
sde 5,5T
└─sde1 ext4 sylvia03 ddfacd6d-9b53-445b-a6a3-38098eaf772b /media/sdf/ 5,5T
nvme0n1 ext4 Media b898ec4b-73b8-4b39-97c1-79b5de689353 /media/sdf/ 1,8T
sdf@sdf-DH310V2:~$
Dernière modification par xubu1957 (Le 06/03/2022, à 14:06)
Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci. Membre de Linux-Azur
Hors ligne
#8 Le 27/05/2021, à 13:37
- Maminette
Re : [RÉSOLU] Impossible de configurer mon réseau local
Pour Iznobe,
j'ai oublié de mettre la copie du terminal dans les <>. Je n'ai pas encore l'habitude.
Je recommence.
#
# 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
client max protocol = NT1
# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)
# 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
username map = /etc/samba/smbusers
security = user
; encrypt passwords = yes
guest ok = yes
guest account = nobody
#======================= Share Definitions =======================
# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[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.
# Un-comment the following parameter to make 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
[Media]
path = /media/sdf/Media
writeable = yes
browseable = yes
guest ok = yes
[mybook]
path = /media/sdf/mybook
writeable = yes
browseable = yes
guest ok = yes
[sylvia02]
path = /media/sdf/sylvia02
writeable = yes
browseable = yes
guest ok = yes
[sylvia03]
path = /media/sdf/sylvia03
writeable = yes
browseable = yes
guest ok = yes
[sylvia04]
path = /media/sdf/sylvia04
writeable = yes
browseable = yes
guest ok = yes
J'ai créé un dossier partage sur mon sda, que j'ai partagé, et miracle, je rentre dedans de mon Macbook.
Le partage de mes disques reste actif, y compris le dossier partage.
Merci Iznobe pour ton aide.
Hors ligne
#9 Le 29/05/2021, à 02:21
- LRDP
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonsoir (ou bonjour, c'est une insomnie)
Votre configuration ressemble à la mienne (plusieurs machines d'OS différents, nombreux disques externes à partager...). Je suis étonné qu'un disque nvme0n1 (M2?) n'ai pas de lettres sdxx, est-ce le cas en regardant "Disques" ou Gparted"?.
Je vous envoie mon smb.conf où j'ai commenté et décommenter plusieurs lignes, ce qui me permet un partage sans lister des utilisateurs et sans mot de passe (la sécurité, utile en entreprise ou en famille nombreuse n'est pas nécessaire quand il n'y a qu'un ou deux utilisateurs qui partagent un réseau local - enfin c'est mon avis personnel-) :
#
# 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
client min protocol = NT1
server min protocol = NT1
# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)
# 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
guest account = nobody
guest ok = yes
#### 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
# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
logging = file
# 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 server" 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
; obey pam restrictions = no
# 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 = no
# 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 config * : backend = tdb
; idmap config * : range = 3000-7999
; idmap config YOURDOMAINHERE : backend = tdb
; idmap config YOURDOMAINHERE : range = 100000-999999
; 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 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
username map = /etc/samba/smbusers
security = user
#======================= Share Definitions =======================
# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[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 = no
# 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 = 0775
# 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 = 0775
# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make 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 = yes
; browseable = no
; create mask = 0600
; directory mask = 0775
[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
[2TO]
path = /media/lrdp/2TO
writeable = yes
; browseable = yes
guest ok = yes
[Fantec2]
path = /media/lrdp/Fantec2
writeable = yes
; browseable = yes
guest ok = yes
Curieusement encore, je n'ai que deux disques décrits, mais 6 disques sont partagés ne local. Et "browseable" est commenté (!?)
J'ajoute un smbusers (dans /etc/samba) qui débloquera peut-être le problème. Je pense qu'il n'y a pas de différence avec votre 18.04, comme mon partage de réseau local a toujours marché depuis Lucid Lynx (10.04):
# Unix_name = SMB_Name1 SMB_Name2 ...
root = administrator
user = <votre nom d'utilisateur>
nobody = guest smbguest pcguest
La Communauté est très active pour aider les jeunes Ubuntiens débutants, cela fait chaud au coeur par ces temps difficiles.
Bon WE à tous
Ubuntu Maté 20.04.6. Garuda Linux Dragonized ARCH Linux i3
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti
Hors ligne
#10 Le 29/05/2021, à 08:17
- iznobe
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour LRDP ,
je ne comprends pas trop ce que tu essaies d' exprimer du coup , as tu aussi un probleme de partage ?
auquel cas il vaut mieux ouvrir un nouveau sujet .
sinon , si tu nous montre un smb.conf , qui n' est pas valide ni pris en compte vu que 2 partages a l' interieur , et que tu en as 6 au total , je ne vois pas trop l' interet .
Pour la configuration de samba , on peut faire cela de 2 façons , manuellement en editant le fichier /etc/samba/smb.conf , ou bien avec la methode graphique , clic droit sur un dossier => partager .
A noter que configurer les 2 a la fois est considéré dans la doc comme incompatible , c ' est soit l' un soit l' autre .
Dernière modification par iznobe (Le 29/05/2021, à 08:18)
retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne
#11 Le 29/05/2021, à 08:31
- LRDP
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour Iznobe,
justement, je n'ai pas du tout de problème de partage et j'essaye aussi, avec mes modestes connaissances, d'aider Maminette . Ayant à chaque mise à niveau la nécessité (et la difficulté) de reconfigurer mon réseau local, à force de trifouiller (plus que bidouiller) Samba, par réécriture du smb.conf, j'arrive à mes fins : pouvoir partager avec un Mac, un autre Linux, des tablettes Ipad, deux lecteurs multimédias tous les fichiers que comportent ces 6 disques qui n'apparaissent pas tous, curieusement sur le smb.conf, tout cela en évitant les mots de passe, fastidieux à inscrire sur les tablettes ou les lecteurs multimédia. J'imagine, dans ma petite tête, que Maminette, en s'inspirant de mon bricolage, pourra résoudre son problème, mais ce n'est que des suggestions, je suis loin d'être un spécialiste comme les autres aidants .
Bonne journée
Ubuntu Maté 20.04.6. Garuda Linux Dragonized ARCH Linux i3
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti
Hors ligne
#12 Le 29/05/2021, à 08:36
- iznobe
Re : [RÉSOLU] Impossible de configurer mon réseau local
, ah ok , merci pour ton aide alors
D ' apres le dernier message de Maminette j ' avais cru comprendre que c' etait resolu , mais qu ' elle n' a pas modifier le titre de son post pour l' indiquer a la communauté :
J'ai créé un dossier partage sur mon sda, que j'ai partagé, et miracle, je rentre dedans de mon Macbook.
Le partage de mes disques reste actif, y compris le dossier partage.Merci Iznobe pour ton aide.
Si jamais tu repasses par là Maminette , et que tu as 2 minutes pour modifier ton toout 1er message et donc ajouter [resolu] sur l' avant du titre , si le probleme est effectivement resolu , ca serait super gentil
retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne
#13 Le 29/05/2021, à 11:31
- Maminette
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour Iznobe, Bonjour LRDP,
merci pour votre aide.
le problème n'est pas complètement résolu : le partage reste actif sur cette machine Ubuntu, mais les disques externes et le disque SSD M2 interne ne sont toujours pas visibles de l'extérieur avec ce message d'erreur :"impossible de monter le partage "windows", permission non accordée". Par contre, le petit dossier "partage" que j'ai créé dans mon Home, partagé simplement par Caja-share, est bien visible, lisible et inscriptible (un peu lent, mais çà marche. Je patauge, parce que je fais la même opération pour chaque disque (au début par System-config-samba, puis ayant installé "cifs-utils" qui a permis de maintenir le partage des disques en regardant par Caja en root, mais je n'ai toujours pas de montage visible de l'extérieur...
Encore merci pour votre aide, si vous avez encore des idées pour m'aider, je suis preneuse...
Hors ligne
#14 Le 02/06/2021, à 16:11
- LRDP
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour Maminette,
je ne sais pas où vous en êtes, mais il m'est venu une idée, très bête, mais d'une logique à pleurer : pourquoi ne pas partager /media dans le système de fichiers ? s'il n'y a pas de media "sensible", si /media comporte uniquement les disques à partager, en faisant un partage récursif : sudo chmod -R 777 /media , il est vraisemblable que vous pourrez accéder à vos disques externes de l'extérieur. ATTENTION : pas d'espace entre / et media cela fusillerait votre machine. Cela fera peut-être hurler les ubunteros, mais bon, le bidouillage est empirique et l'empirisme a mené la civilisation jusqu'à notre époque actuelle.
Ubuntu Maté 20.04.6. Garuda Linux Dragonized ARCH Linux i3
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti
Hors ligne
#15 Le 02/06/2021, à 17:13
- Maminette
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour LRDP,
J'ai partagé le dossier média, avec tout son contenu, en suivant tes indications dans un terminal et cela fonctionne. Je peux entrer dans mes disques qui sont sur ubuntu à partir de mon Macbook.
Merci mille fois LRDP.
Hors ligne
#16 Le 02/06/2021, à 17:22
- iznobe
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonjour , pour le cas de disque amovible , je ne suis pas certain de savoir comment cela fonctionne .
il faut que le service samba prenne en compte les partages a la volée , si les disques ne sont pas commenctés au demarrage .
Selon le type de partition de ces disques , il ne faut peut etre pas les meme parametres .
Bref , ce qu ' il faut comprendre , c ' est que :
1°) samba ne peut pas partager des fichiers si ils ne font pas partie du systeme de fichiers principal .
2°) les systemes de fichiers sur disque externes ne sont pas forcément montés automatiquement a la conexion de ceux-ci , et que selon le type de partition , il faut aplliquer les options adequates de façon a obtenir les droits adequates afin de pouvoir les partager , via samba si celui-ci gere a la volée ( chose dont je ne suis pas certain ) .
pour que cela fonctionne , il faut donc s ' assurer qu ' a la connexion d ' un disque externe , les partitions contenues dans ce disque sur lesquelles sont situés les fichiers que vous voulez partager soient montée automatiquement avec les bon droits .
a partir de là , il sera possible de partager les fichiers .
Il faut donc y aller par etape , en prenant un dossier d ' un disque externe a partager et faire que tout roule .
Il suffira ensuite de reproduire la meme chose pour chaque dossiers .
L ' inscription d' un disque externe dans le fstab n ' est pas conseillé , il faut proceder avec un autre programme , que je ne connais pas ...
je crois qu il se nomme udisksctl ou un truc approchant , je vais essayer de voir ce que dis le man :
man udisksctl
Il faudrait aussi qu on sache a quel type de partition on a affaire .( ntfs , ext4 , autre ? )
Dernière modification par iznobe (Le 02/06/2021, à 17:25)
retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne
#17 Le 02/06/2021, à 18:10
- Maminette
Re : [RÉSOLU] Impossible de configurer mon réseau local
Bonsoir Iznode,
Merci de ton attention pour mon problème, mais malgré plusieurs redémarrages, cela fonctionne toujours : mes disques externes et le M2 (tous en ext 4) se montent tout seuls et restent partagés. Je n'ai pas remodifié le smb.conf depuis les derniers messages le concernant. Je ne sais pas ce qu'est le fstab et j'avance prudemment !!!
Merci encore pour cette discussion intéressante.
Dernière modification par Maminette (Le 02/06/2021, à 18:11)
Hors ligne
#18 Le 02/06/2021, à 19:11
- iznobe
Re : [RÉSOLU] Impossible de configurer mon réseau local
ok , dans ce cas , c ' est parfait
retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne