[CentOS] Samba shares not appearing

Mon Mar 16 09:18:56 UTC 2015
Earl A Ramirez <earlaramirez at gmail.com>

On Mon, 2015-03-16 at 09:59 +0100, Niki Kovacs wrote:
> Hi,
> 
> I'm currently fiddling with Samba, trying to make it work on CentOS 7. 
> Before that, I ran Samba successfully in a mixed environment with 
> Slackware64 14.1 on the server and Slackware/Windows Seven on the client 
> side.
> 
> I have three sandbox machines running CentOS 7. One has a minimal 
> install with only the samba and samba-client packages. Just to be on the 
> safe side for fiddling, SELinux is disabled, there's no firewall, etc.
> 
> I installed the 'samba' and 'samba-client' packages and edited a custom 
> /etc/samba/smb.conf like this:
> 
> # /etc/samba/smb.conf
> 
> [global]
> workgroup = WORKGROUP
> server string = Serveur de fichiers AMANDINE
> netbios name = AMANDINE
> dns proxy = yes
> domain master = yes
> log file = /var/log/samba/log.%m
> max log size = 1000
> syslog = 2
> bind interfaces only = yes
> interfaces = 192.168.2.0/24 localhost
> hosts allow = 192.168.2. 127.
> security = user
> passdb backend = tdbsam
> unix password sync = no
> invalid users = root
> encrypt passwords = yes
> guest account=smbguest
> map to guest = bad user
> force group = users
> create mode = 0660
> directory mode = 0770
> load printers = no
> printing = bsd
> printcap name = /dev/null
> disable spoolss = yes
> 
> [Public]
> path = /srv/samba/public
> comment = Partage Public
> public = yes
> only guest = yes
> read only = no
> 
> [Confidentiel]
> path = /srv/samba/confidentiel
> comment = Partage Confidentiel
> read only = no
> invalid users = root nobody smbguest
> 
> 
> Note: I explicitly disabled printing because Samba apparently refused to 
> start, complaining about missing printers. And I did not forget to 
> create a handful of Samba users (smbguest as well as normal users).
> 
> 
> On the server, I have this:
> 
> 
> # smbclient -L localhost -N
> Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.1]
> 
> 	Sharename       Type      Comment
> 	---------       ----      -------
> 	Public          Disk      Partage Public
> 	Confidentiel    Disk      Partage Confidentiel
> 	IPC$            IPC       IPC Service (Serveur de fichiers AMANDINE)
> Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.1]
> 
> 	Server               Comment
> 	---------            -------
> 	AMANDINE             Serveur de fichiers AMANDINE
> 	NAS
> 
> 	Workgroup            Master
> 	---------            -------
> 	WORKGROUP            AMANDINE
> 
> On the desktop clients (running CentOS 7 + GNOME), when I click on 
> "Explorer le réseau" (I think it is "Browse Network" in english), I 
> don't see any server appearing. The 'samba-client' package is installed 
> on the clients.
> 
> Now I'm a bit clueless. Any suggestions on what to try next?
> 
> Cheers,
> 
> Niki

Hello Niki,

I replicated your settings on a CentOS 7 on a KVM, I did not see the
samba server when I click on "Browse Network", however when I enter
smb://<server_IP_address>/ I was able to see the shares.

If Im not mistaken the 'nmb' service is responsible for browsing,
therefore I stopped it and I was not longer able to see the shares from
a windows or samba client.

What is the output of:
$ smbclient -L <samba_server_host-or-IP> -U <samba_user> 
from one of the samba clients?