Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 12/05/2018, à 18:09

LRDP

Le réseau local me désespère [ENFIN RÉSOLU]

Bonjour,
je me bats depuis une semaine pour un souci de réseau local qui ne fonctionne plus. J'ai réinstallé Ubuntu plusieurs fois, réinstallé samba, partagé mes disques de média avec les droits d'utilisateurs, configurer system-config-samba... et je ne peux toujours pas voir le contenu de ces disques par des appareils distants (lecteurs multimédias, tablettes...) alors que tout marchait bien auparavant, avant qu'un piratage de ma boite mail me fasse réinstaller mon système par sécurité. Mon ordi est détecté, mais pas le contenu partagé. Quelques renseignements:
Testparm:

testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[2TO]"
Processing section "[Fantec1]"
Processing section "[Fantec2]"
Processing section "[Fantec3]"
Processing section "[Fantec4]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	server string = %h server (Samba, Ubuntu)
	server role = standalone server
	security = USER
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	username map = /etc/samba/smbusers
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb


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


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


[2TO]
	path = /media/lrdp/2TO
	read only = No
	guest ok = Yes


[Fantec1]
	path = /media/lrdp/Fantec1
	read only = No
	guest ok = Yes


[Fantec2]
	path = /media/lrdp/Fantec2
	read only = No
	guest ok = Yes


[Fantec3]
	path = /media/lrdp/Fantec3
	read only = No
	guest ok = Yes


[Fantec4]
	path = /media/lrdp/Fantec4
	read only = No
	guest ok = Yes

smb.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

# 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 = yes

# 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 = no
;	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

[2TO]
	path = /media/lrdp/2TO
	writeable = yes
;	browseable = yes
	guest ok = yes

[Fantec1]
	path = /media/lrdp/Fantec1
	writeable = yes
;	browseable = yes
	guest ok = yes

[Fantec2]
	path = /media/lrdp/Fantec2
	writeable = yes
;	browseable = yes
	guest ok = yes

[Fantec3]
	path = /media/lrdp/Fantec3
	writeable = yes
;	browseable = yes
	guest ok = yes

[Fantec4]
	path = /media/lrdp/Fantec4
	writeable = yes
;	browseable = yes
	guest ok = yes

ifconfig (à tout hasard, la connexion internet fonctionne)

ifconfig
enp3s0    Link encap:Ethernet  HWaddr e8:94:f6:08:5d:25  
          inet adr:192.168.1.22  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::b2e6:fe4d:2082:525a/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:7366 erreurs:0 :0 overruns:0 frame:0
          TX packets:5065 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:5449167 (5.4 MB) Octets transmis:580946 (580.9 KB)

lo        Link encap:Boucle locale  
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          Packets reçus:597 erreurs:0 :0 overruns:0 frame:0
          TX packets:597 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1 
          Octets reçus:74916 (74.9 KB) Octets transmis:74916 (74.9 KB)

le 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=ac1db532-ddfe-4c10-a3f4-db73e96e2db0 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda2 during installation
UUID=1b6b61cc-280a-48f2-86ea-c32254a5dd93 /boot           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
UUID=adfb14ca-b673-4994-87d0-9e1ec848eeee none            swap    sw              0       0

le mtab

sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=4018988k,nr_inodes=1004747,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=814476k,mode=755 0 0
/dev/sda1 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=24,pgrp=1,timeout=0,minproto=5,maxproto=5,direct 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/sda2 /boot ext4 rw,relatime,data=ordered 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=814476k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sdd1 /media/lrdp/2TO ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/sdc1 /media/lrdp/Sauvegarde ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/sdb1 /media/lrdp/Stockage ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/sde2 /media/lrdp/Documents ext4 rw,nosuid,nodev,relatime,stripe=32751,data=ordered 0 0
/dev/sdf1 /media/lrdp/Fantec1 ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/sdg1 /media/lrdp/Fantec2 ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/sdi1 /media/lrdp/Fantec4 ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/sdh1 /media/lrdp/Fantec3 ext4 rw,nosuid,nodev,relatime,data=ordered 0 0

Merci de me venir en aide, mon épouse n'arrive plus à s'endormir sans voir ses séries préférées enregistrées.

Dernière modification par LRDP (Le 22/05/2018, à 12:56)


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#2 Le 12/05/2018, à 21:19

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

J'ajoute les permissions des médias

ls -la /media/lrdp
total 48
drwxr-x---+ 10 root root  4096 mai   12 21:14 .
drwxr-xr-x   3 root root  4096 mai   12 17:22 ..
drwxrwxrwx  39 lrdp lrdp  4096 mai    6 19:31 2TO
drwxrwxr-x  16 lrdp lrdp  4096 mai   12 17:43 Documents
drwxrwxrwx  99 lrdp lrdp 12288 avril 29 11:54 Fantec1
drwxrwxrwx  13 lrdp lrdp  4096 oct.  13  2017 Fantec2
drwxrwxrwx  13 lrdp lrdp  4096 mars   4 17:13 Fantec3
drwxrwxrwx   3 lrdp lrdp  4096 mars   6 12:52 Fantec4
drwxrwxrwx  15 lrdp lrdp  4096 mai   12 08:11 Sauvegarde
drwxrwxrwx   8 lrdp lrdp  4096 oct.  31  2016 Stockage

Je partage 2TO, Fantec1 & 2. Je les vois sur d'autres postes (Ipad par ex.), mais la liste des fichiers contenus ne s'affiche pas ("lists failed") .J'ai même modifié les permissions dans /var/lib/samba/usershares de root vers username (lrdp) ce qui permet de faire un partage sans les droits d'administrateurs, mais cela ne change rien (en principe cette opération n'est pas utile, vu que cela revient vers root après un redémarrage).


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#3 Le 12/05/2018, à 21:26

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

et la commande smbclient:

smbclient -L LRDP-MS-7640
WARNING: The "syslog" option is deprecated
Enter lrdp's password: 
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]

	Sharename       Type      Comment
	---------       ----      -------
	print$          Disk      Printer Drivers
	2TO             Disk      
	Fantec1         Disk      
	Fantec2         Disk      
	Fantec3         Disk      
	IPC$            IPC       IPC Service (lrdp-MS-7640 server (Samba, Ubuntu))
	Brother_MFC_J6910DW Printer   Brother MFC-J6910DW @ MacBook Pro
	Epson_Stylus_Office_BX635FWD Printer   Epson Stylus Office BX635FWD @ MacBook Pro
	Fantec4         Disk      
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]

	Server               Comment
	---------            -------
	LIVEBOX              Livebox
	LRDP-MS-7640         lrdp-MS-7640 server (Samba, Ubuntu)

	Workgroup            Master
	---------            -------
	WORKGROUP            LIVEBOX

Il n'y a pas si longtemps, Samba fonctionnait très facilement (pour moi, il y a quinze jours seulement). Samba a-t-il changé entre-temps?


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#4 Le 13/05/2018, à 06:34

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Bonjour,
en rallumant l'ordi ce matin, les partages ont disparus ; pas étonnant que rien n'apparaisse sur les autres machines.

Un petit UP ferait plaisir, j'ai épuisé tout ce que j'ai pu trouver comme solutions sur la doc et le forum.
Merci.


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#5 Le 13/05/2018, à 07:22

rogn...

Re : Le réseau local me désespère [ENFIN RÉSOLU]

LRDP a écrit :

vant qu'un piratage de ma boite mail me fasse réinstaller mon système par sécurité.

Tu as juste perdu du temps, à mon avis.

Sinon, SMB pour le partage, c'est moyen-moyen. Ça fait longtemps que tous mes appareils discutent par SFTP via tunnel SSH. Je n'ai rien trouvé de plus standard aussi fonctionnel que sécurisé pour le transfert de mes fichiers de poste à poste smile.

#6 Le 13/05/2018, à 08:57

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Merci rogn... pour me répondre, mais je suis toujours dans l'embarras. J'ai réinstallé aussi du fait de l'instabilité de la 16.04.4 que j'avais installé 6 semaines avant (disparition systématique du tableau de bord, paquets à réinstaller plusieurs fois, Virtual box complètement foireuse...). Je ne sais pas ce qui c'est produit au passage à cette version supérieure, mais paradoxalement, le réseau local marchait parfaitement. La réinstall avec le même /home bloquait définitivement. Je me suis résolu à faire une nouvelle installation fraîche, mais le réseau local ne fonctionne plus : les disques sont détectés, mais pas leurs contenus.


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#7 Le 13/05/2018, à 09:04

rogn...

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Et je me demande pourquoi tu continues à t'embêter à partager des données partiellement protégées via SMB alors que je te parle de SSH.

#8 Le 13/05/2018, à 10:30

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Oui, j'ai bien pensé à SSH ou NFS, complexes à configurer par mes (mé)connaissances en informatique; mais surtout le but est de partager des fichiers avec du matériel qui ne reconnaît que du samba : tablettes, lecteur multimédia (Western Digital WDT-live). System-config-samba est archi-simple à configurer, mais est actuellement inopérant pour partager le contenu des disques partagés.


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#9 Le 13/05/2018, à 12:12

kralisec

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Bonjour,

Le poste #2 m'a rappelé la commande "getfacl" (et "setfacl"), cela donne accès à la liste des droits du point de vue de samba,
cela ressemble à un problème de droit et te donner des pistes pour avancer.


Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en-dessous

Hors ligne

#10 Le 13/05/2018, à 14:43

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Merci Kralisec pour cette piste.
J'ai vérifié avec getfacl pour chaque disque dont je donne l'exemple:

getfacl /media/lrdp/Fantec4
getfacl : suppression du premier « / » des noms de chemins absolus
# file: media/lrdp/Fantec4
# owner: lrdp
# group: lrdp
user::rwx
group::rwx
other::rwx

Donc les disques ont bien leurs autorisations pour être consultés; mais sont toujours illisibles.


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#11 Le 13/05/2018, à 17:17

kralisec

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Cela donne quoi avec :

sudo mount.cifs //_server_/_partage_ /mnt/ -o username=_nom_utilisateur_,iocharset=utf8,noperm

autre idée rajouter après noperm,vers=2.0   ?


Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en-dessous

Hors ligne

#12 Le 13/05/2018, à 18:47

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

kralisec a écrit :

Cela donne quoi avec :

sudo mount.cifs //_server_/_partage_ /mnt/ -o username=_nom_utilisateur_,iocharset=utf8,noperm

réponse:

sudo mount.cifs // LRDP-MS-7640/media/lrdp/2TO /mnt/ -o username=lrdp_,iocharset=utf8,noperm
Couldn't chdir to LRDP-MS-7640/media/lrdp/2TO: No such file or directory

ou encore

sudo mount.cifs // media/lrdp/2TO /mnt/ -o username=lrdp_,iocharset=utf8,noperm
Couldn't chdir to media/lrdp/2TO: No such file or directory

Je ne sais pas nommer le serveur, j'ai beaucoup de mal avec les réseaux à l'évidence...


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#13 Le 13/05/2018, à 18:48

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

un autre essai

sudo mount.cifs // /media/lrdp/2TO /mnt/ -o username=lrdp,iocharset=utf8,noperm
mount error: UNC name too short

Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#14 Le 13/05/2018, à 18:54

kralisec

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Un espace en trop et c'est nom serveur et nom de partage (share)

sudo mount.cifs //LRDP-MS-7640/2To /mnt/ -o username=lrdp,iocharset=utf8,noperm

idem

sudo mount.cifs //media/2TO /mnt/ -o username=lrdp,iocharset=utf8,noperm
sudo mount.cifs //media/2TO /mnt/ -o username=lrdp,iocharset=utf8,noperm

=> pour que cela fonctionne il faut que "ping media" (ou bien ping LRDP-MS-7640 ) donne un résultat sinon mettre directement l'adresse IP

Dernière modification par kralisec (Le 13/05/2018, à 18:56)


Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en-dessous

Hors ligne

#15 Le 13/05/2018, à 19:19

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Le ping fonctionne sur l'IP. La commande est correcte avec cette correction d'espace roll . Mais je n'ai pas créé d'user spécifique avec mot de passe, car j'avais l’habitude de configurer system-samba-common avec un accès pour tous sans mot de passe, afin de faciliter l'accès aux disques partagés par un lecteur multimédia ou une tablette. La commande mount.cifs me renvoie:

sudo mount.cifs //192.168.1.22/media/lrdp/2To /mnt/ -o username=lrdp,iocharset=utf8,noperm
Password for lrdp@//192.168.1.22/media/lrdp/2To: 
Unable to find suitable address.

Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#16 Le 13/05/2018, à 19:31

kralisec

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Essaie avec //192.168.1.22/2To  et pas //192.168.1.22/media/lrdp/2To


Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en-dessous

Hors ligne

#17 Le 13/05/2018, à 19:45

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

essai avec noperm=2

>sudo mount.cifs //192.168.1.22/2To /mnt/ -o username=lrdp,iocharset=utf8,noperm=2
[sudo] password for lrdp: 
Password for lrdp@//192.168.1.22/2To: 
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Et sans =2

sudo mount.cifs //192.168.1.22/2To /mnt/ -o username=lrdp,iocharset=utf8,noperm
Password for lrdp@//192.168.1.22/2To: 
Unable to find suitable address.

Je crois qu'il faut que je révise la mise en place d'un réseau. Dommage que Samba s'est compliqué ces derniers temps, car c'était si simple du temps de Trusty ou Precise. Je vais faire l'installation de la 18.04 et configurer Samba (ou NFS) pas à pas et voir ce que çà donne, en utilisant ces commandes pour cifs.


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#18 Le 13/05/2018, à 20:01

kralisec

Re : Le réseau local me désespère [ENFIN RÉSOLU]

C'était noperm,vers=2.0 (noperm=2 n'existe pas, de la l'erreur de syntaxe)

Pour paramétrer samba: webmin est sympa à utiliser.


Perso j'ai exactement le même message d'erreur quand j'utilise une IP au hasard (pas l'adresse du serveur)
plusieurs pistes: vérifier l'adresse, vérifier si il y a un firewall, vérifier si samba est actif sur l'adresse: sudo service smb status (?)

Le poste .22 est celui sur lequel tu exécutes la commande ?

Que donne:

sudo apt-get install smbclient
smbclient -L 192.168.1.22 -U lrpd
smbclient -L 192.168.1.22 -U guest

Si le guest donne NT_STATUS_ACCOUNT_DISABLED je dirais que le partage sans mot de passe n'est pas bon
(ou bien Everyone à place de guest)


Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en-dessous

Hors ligne

#19 Le 13/05/2018, à 20:08

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Première commande :

smbclient -L 192.168.1.22 -U lrpd
WARNING: The "syslog" option is deprecated
Enter lrpd's password: 
Connection to 192.168.1.22 failed (Error NT_STATUS_CONNECTION_REFUSED)

2ème:

smbclient -L 192.168.1.22 everyone
WARNING: The "syslog" option is deprecated

everyone: Not enough '\' characters in service

Le .22 est bien mon ordi


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#20 Le 13/05/2018, à 20:11

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Merci Kralisec, tes conseils me sont utiles.
Je vais lancer une install de 18.04 cette nuit et reprendrais les tentatives demain soir.


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#21 Le 16/05/2018, à 19:09

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Rebonjour,
Quelques nouvelles du jour: j'ai réinstallé Ubuntu-Mate 16.04.4, samba, system-config-samba, partager mes disques contenant films et musique. Je les vois sur une tablette par exemple, mais toujours pas leur contenu ; "list files failed".
J'ai édité smb.conf, décommenté "browsable = yes" dans le chapitre "share definitions" dans les lignes spécifiques à ces disques. En voici le tiré-à-part:

#
# 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

# 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 = no
;	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

[2TO]
	path = /media/lrdp/2TO
	writeable = yes
	browseable = yes
	guest ok = yes

[Fantec1]
	path = /media/lrdp/Fantec1
	writeable = yes
	browseable = yes
	guest ok = yes

[Fantec2]
	path = /media/lrdp/Fantec2
	writeable = yes
	browseable = yes
	guest ok = yes

[Fantec3]
	path = /media/lrdp/Fantec3
	writeable = yes
	browseable = yes
	guest ok = yes

Je n'avais jamais eu besoin depuis Precise Pangolin jusqu'à maintenant de modifier le smb.conf. Le partage et l'accès au contenu de ces disques se faisaient tout seul, sans avoir besoin de créer des listes d'utilisateurs avec mots de passe (nous sommes deux à la maison et rien à cacher). Le paradoxe, c'est qu'établir un réseau local est maintenant plus facile avec Windows 10 (comme à mon bureau) qu'avec Ubuntu à la maison, j'n'y crois pas!! roll

Un testparm:

 testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[2TO]"
Processing section "[Fantec1]"
Processing section "[Fantec2]"
Processing section "[Fantec3]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	server string = %h server (Samba, Ubuntu)
	server role = standalone server
	security = USER
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	username map = /etc/samba/smbusers
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb


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


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


[2TO]
	path = /media/lrdp/2TO
	read only = No
	guest ok = Yes


[Fantec1]
	path = /media/lrdp/Fantec1
	read only = No
	guest ok = Yes


[Fantec2]
	path = /media/lrdp/Fantec2
	read only = No
	guest ok = Yes


[Fantec3]
	path = /media/lrdp/Fantec3
	read only = No
	guest ok = Yes

Bidouiller "rlimit" n'avait rien arrangé précédemment.
Comme je détecte les disques par ailleurs, c'est que la configuration réseau est correct (à priori) alors pourquoi n'est-il pas possible de voir le contenu?


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#22 Le 16/05/2018, à 19:13

kralisec

Re : Le réseau local me désespère [ENFIN RÉSOLU]

J'ai un souvenir que samba m'avait forcé à mettre un mot de passe, impossible de lui faire accepter une connexion avec identifiant et mdp de vide.

Essaie d'installer webmin: il est très pratique pour faire des configurations pointue en faisant du simple clic smile

Dernière modification par kralisec (Le 16/05/2018, à 20:43)


Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en-dessous

Hors ligne

#23 Le 16/05/2018, à 20:49

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

Bonsoir Kralisec,
Webmin m'indique que les disques et leurs contenus ont toutes les permissions requises, mais je ne vois pas comment, par Webmin, assurer en réseau l'accès aux fichiers des disques partagés. La doc n'est pas très claire à ce sujet (ce démon ne doit pas être très usité). Est-ce finalement un problème réseau ou un problème de partage?


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#24 Le 16/05/2018, à 20:55

LRDP

Re : Le réseau local me désespère [ENFIN RÉSOLU]

C'était tellement plus simple avec security = share


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#25 Le 16/05/2018, à 21:11

kralisec

Re : Le réseau local me désespère [ENFIN RÉSOLU]

LRDP a écrit :

Bonsoir Kralisec,
Webmin m'indique que les disques et leurs contenus ont toutes les permissions requises, mais je ne vois pas comment, par Webmin, assurer en réseau l'accès aux fichiers des disques partagés. La doc n'est pas très claire à ce sujet (ce démon ne doit pas être très usité). Est-ce finalement un problème réseau ou un problème de partage?

Webmin est un moyen de configurer un système linux : webmin pour administration web (web-min)

cela se trouve sur le site webmin.com

Dernière modification par kralisec (Le 16/05/2018, à 21:12)


Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en-dessous

Hors ligne