Avahi + Samba on Mint 18.2 network shares not visible

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 11:10 am

Networking on 18.2 is much harder than earlier releases. Caja share isn't even installed for a start :twisted:

I have multiple Mint 18.2 machines all running Avahi + Samba but there are a couple of odd machines that won't / can't share. Yet most do! The folders on the problem machines show they have sharing enabled and permissions granted yet the shared folders are invisible from other Mint machines. The 'Shared Folders' icon does not show up in the control center.

Help please!

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by altair4 » Sun Jun 03, 2018 11:54 am

The folders on the problem machines show they have sharing enabled and permissions granted yet the shared folders are invisible from other Mint machines.
Pick one of those machines and:

[1] Verify that avahi is running:

Code: Select all

sudo service avahi-daemon status
If it's not running start it: sudo service avahi-daemon start

[2] Verify that you have created shares:

Code: Select all

net usershare info --long
You might want to post the output to the forum.

[3] Verify that smbd is running:

Code: Select all

sudo service smbd status
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 12:14 pm

Following your instructions this is what I have:

Code: Select all

● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-06-02 10:48:10 PDT; 22h ago
 Main PID: 875 (avahi-daemon)
   Status: "avahi-daemon 0.6.32-rc starting up."
   CGroup: /system.slice/avahi-daemon.service
           ├─875 avahi-daemon: running [i7-7700HQ.local
           └─894 avahi-daemon: chroot helpe

Jun 02 18:46:43 i7-7700HQ avahi-daemon[875]: Interface wlp2s0.IPv6 no longer relevant for mDNS.
Jun 02 18:46:43 i7-7700HQ avahi-daemon[875]: Withdrawing address record for 192.168.42.82 on wlp2s0.
Jun 02 18:46:43 i7-7700HQ avahi-daemon[875]: Leaving mDNS multicast group on interface wlp2s0.IPv4 with address 192.168.
Jun 02 18:46:43 i7-7700HQ avahi-daemon[875]: Interface wlp2s0.IPv4 no longer relevant for mDNS.
Jun 02 18:46:50 i7-7700HQ avahi-daemon[875]: Joining mDNS multicast group on interface wlp2s0.IPv4 with address 192.168.
Jun 02 18:46:50 i7-7700HQ avahi-daemon[875]: New relevant interface wlp2s0.IPv4 for mDNS.
Jun 02 18:46:50 i7-7700HQ avahi-daemon[875]: Registering new address record for 192.168.42.82 on wlp2s0.IPv4.
Jun 02 18:46:51 i7-7700HQ avahi-daemon[875]: Joining mDNS multicast group on interface wlp2s0.IPv6 with address fe80::1d
Jun 02 18:46:51 i7-7700HQ avahi-daemon[875]: New relevant interface wlp2s0.IPv6 for mDNS.
Jun 02 18:46:51 i7-7700HQ avahi-daemon[875]: Registering new address record for fe80::1d75:7750:532b:6db4 on wlp2s0.*.
lines 1-19/19 (END)

[new_shared]
path=/home/clive/Desktop/new_shared
comment=another share on 7700
usershare_acl=Everyone:F,
guest_ok=y

[Public]
path=/home/clive/Public
comment=
usershare_acl=Everyone:F,
guest_ok=y

[shared]
path=/home/clive/Desktop/shared
comment=
usershare_acl=Everyone:F,
guest_ok=y

● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
   Active: active (running) since Sat 2018-06-02 10:48:11 PDT; 22h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 30416 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS)
  Process: 1265 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/smbd.service
           ├─ 1355 /usr/sbin/smbd -D
           ├─ 1357 /usr/sbin/smbd -D
           ├─ 1361 /usr/sbin/smbd -D
           ├─ 2730 /usr/sbin/smbd -D
           ├─14198 /usr/sbin/smbd -D
           └─31062 /usr/sbin/smbd -D

Jun 02 17:50:38 i7-7700HQ smbd[30311]: pam_unix(samba:session): session closed for user nobody
Jun 02 17:51:18 i7-7700HQ smbd[30534]: pam_unix(samba:session): session closed for user nobody
Jun 02 18:11:08 i7-7700HQ smbd[972]: pam_unix(samba:session): session closed for user nobody
Jun 02 19:20:16 i7-7700HQ smbd[15373]: pam_unix(samba:session): session closed for user nobody
Jun 02 19:20:16 i7-7700HQ smbd[15376]: pam_unix(samba:session): session closed for user nobody
Jun 03 07:35:02 i7-7700HQ systemd[1]: Reloading LSB: start Samba SMB/CIFS daemon (smbd).
Jun 03 07:35:02 i7-7700HQ smbd[30416]:  * Reloading /etc/samba/smb.conf smbd
Jun 03 07:35:02 i7-7700HQ smbd[30416]:    ...done.
Jun 03 07:35:02 i7-7700HQ systemd[1]: Reloaded LSB: start Samba SMB/CIFS daemon (smbd).
Jun 03 09:09:26 i7-7700HQ smbd[794]: pam_unix(samba:session): session closed for user nobody
Thanks for looking at this issue.

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by altair4 » Sun Jun 03, 2018 1:05 pm

Not sure what these are all about:
pam_unix(samba:session): session closed for user nobody
But everything else looks more or less OK.

I suspect either a firewall is running on that box or it's not in the same network as your other machines.

If you encrypted your home directory guest access wouldn't work but that would not prevent you from getting a list of shares when your run smb://i7-7700HQ.local from another box.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 1:25 pm

The problem machine can see the shares on other machines, so they are on the same network. It can't see the share on itself :roll: I have no firewall running (I think) and nothing encrypted.

Code: Select all

pam_unix(samba:session): session closed for user nobody
lead me to this that I found on another forum:
https://forums.opensuse.org/showthread. ... ba-server!
which seems to have a similar issue. But the solution seems to be magic.

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by altair4 » Sun Jun 03, 2018 1:45 pm

Just to make sure disable the firewall this way:

Code: Select all

sudo ufw disable
Can you ping this machine from another machine:

Code: Select all

ping -c3 i7-7700HQ.local
And take a look at your /etc/nsswitch.conf file. You should have a "hosts" line that looks like this:
hosts: files mdns4_minimal [NOTFOUND=return] dns
Is mdns4_minimal missing from that line?

And finally can you access your machine by it's ip address:

Code: Select all

smb://192.168.0.100
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 1:56 pm

The problem machine can see the Avahi and the Windows shares on other machines. No machines can see the shares on the problem computer. Would that suggest an SMB problem and not an Avahi issue?

The print-hood of the problem machine is visible. The ping works too.

Code: Select all

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
still no joy.

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 2:37 pm

I went back and took a look at smb.conf and noted that I had commented out security = share I reinstated it rebooted, and tried to enable the share again and got this message

Code: Select all

Samba's testparm returned error 1: Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by altair4 » Sun Jun 03, 2018 2:46 pm

security = share will disable samba ( smbd ) from running since it is no longer a valid option so I would comment it out again.

The problem is somewhere else. I don't know what it is at the moment but if from your own machine you can't access your own shares by ip address either it sure sounds like a samba issue.

Comment out the security = share line again, save the file then post the output of this command:

Code: Select all

testparm -s
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 3:02 pm

I got this:

Code: Select all

clive@i7-7700HQ ~ $ 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$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	workgroup = CLIVEWORKGROUP
	server string = %h server (Samba, Ubuntu)
	server role = standalone server
	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* .
	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

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by altair4 » Sun Jun 03, 2018 3:05 pm

Nothing wrong with that either.

At the moment I don't have an answer.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 3:15 pm

Dang. Thanks for trying.

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible

Post by CliveMcCarthy » Sun Jun 03, 2018 6:13 pm

As a brute force measure I installed an smb.conf from one of my machines that works correctly. It made no difference. :(

CliveMcCarthy
Level 2
Level 2
Posts: 85
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Avahi + Samba on Mint 18.2 network shares not visible [SOLVED]

Post by CliveMcCarthy » Sun Jun 03, 2018 9:59 pm

Out of desperation I purged Samba:

sudo apt-get purge samba samba-common
sudo apt-get install samba


Then re-installed caja-share because it was gone

sudo apt-get install caja-share

then rebooted. And it works :D

Post Reply

Return to “Other networking topics”