[Samba] Samba and UFW

Rowland Penny rpenny at samba.org
Fri Feb 1 22:15:03 UTC 2019


On Fri, 1 Feb 2019 13:53:26 -0500
<mmcg29440 at frontier.com> wrote:

> Just call me Marty. Ham13 is a login name on another system. OK. I'm
> posting the smb.conf and thee smbclient responses form both Linux
> PC's. One running Mint 19.1 and the other running Mint 18.3. The 18.3
> machine does connect to the network. All I want to do use the file
> manager to connect to and open directories and to move files between
> the three PC's.
> 

OK, if we remove the commented lines from the two smb.conf files, we
get these:

smb.conf from Linux Mint 19.1

[global]
   workgroup = WORKGROUP
   client max protocol = NT1
   name resolve order = bcast host lmhosts wins
   printing = cups
   printcap name = cups
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:*%n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

Linux  Mint 18.3 smb.conf

[global]
   workgroup = WORKGROUP
	server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:*%n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

The differences are:

The smb.conf from Linux Mint 19.1 has these lines that the other doesn't

[global]
   client max protocol = NT1
   name resolve order = bcast host lmhosts wins
   printing = cups
   printcap name = cups
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n
   *Retype\snew\s*\spassword:*%n\n *password\supdated\ssuccessfully* 

Running this on the Linux Mint 19.1 machine:

martin at radio:~$ smbclient -L localhost

Works

But running the same command on the Linux 18.3 machine fails with:

Connection to locahost failed (Error NT_STATUS_UNSUCCESSFUL)

or:

Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)

I have tested both smb.conf files on a Samba 4.8.8 machine (without a
firewall) and they both work for me.

Bit late here, I will install ufw tomorrow and see if this throws a
spanner in the works.

Rowland



More information about the samba mailing list