1

I am running Ubuntu 18-04

About a month ago samba stopped working. My best guess is it was due to an update which are automatic.

I have been working on this seriously for the last week with out success. I have gone as far as I can go.

I am currently using a standard smb file apart from my share which I have added:

[Home Share]

comment = Home Public folders
path = /home/mike/
writable = yes
valid users = mike
browseable = yes

Various combinations of parameters I have added to the Global Setting with out success are:

tls enabled = no
client max protocol = NT1 # I tried these separately, not together
client min protocol = SMB2 # I tried these separately, not together
name resolve order = bcast host lmhosts wins
client NTLMv2 auth = no
client use spnego = no
netbios name = MAIL
preferred master = yes
domain master = yes

Some possibly useful information:

smbclient -L mail -U mike
WARNING: The "syslog" option is deprecated
Enter WORKGROUP\mike's password: 

Sharename       Type      Comment
---------       ----      -------
print$          Disk      Printer Drivers
Home Share      Disk      Home Public folders
IPC$            IPC       IPC Service (mail server (Samba, Ubuntu))
Brother_MFC_J480DW Printer   Brother MFC-J480DW
Reconnecting with SMB1 for workgroup listing.

Server               Comment
---------            -------

Workgroup            Master
---------            -------
WORKGROUP            MAIL

smbtree
WARNING: The "syslog" option is deprecated
added interface eno1 ip=192.168.1.104 
bcast=192.168.1.255 netmask=255.255.255.0
resolve_lmhosts: Attempting lmhosts lookup for 
name WORKGROUP<0x1d>
name_resolve_bcast: Attempting broadcast 
lookup for name WORKGROUP<0x1d>
resolve_lmhosts: Attempting lmhosts lookup for 
name WORKGROUP<0x1b>
resolve_wins: WINS server resolution selected 
and no WINS servers listed.
name_resolve_bcast: Attempting broadcast l 
lookup for name WORKGROUP<0x1b>
name_resolve_bcast: Attempting broadcast 
lookup for name __MSBROWSE__<0x1>

net ads testjoin
ads_connect: No logon servers are currently 
available to service the logon request.
Join to domain is not valid: No logon servers 
are currently available to service the logon 
request.

In the logs it says stuff like:

Failed to fetch domain sid for WORKGROUP

and

[2019/01/10 09:50:20.954660,  3] 
../source3/lib/util_procid.c:54(pid_to_procid)
pid_to_procid: messaging_dgm_get_unique 
failed: No such file or directory

Googling these log entries has not produced any meaningful results. So I am out of ideas. Any assistance with this would be greatly appreciated.

Thank you for your help chernobyl, I really appreciate it.

Unfortunately there was no change. Below is output of testparm. The /mnt/testshare directory has been created.

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit 
(16384)
Processing section "[Test Share]"
Loaded services file OK.
WARNING: socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
This warning is printed because you set one of the
following options: SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT,
SO_RCVLOWAT
Modern server operating systems are tuned for
high network performance in the majority of situations;
when you set 'socket options' you are overriding those
settings.
Linux in particular has an auto-tuning mechanism for
buffer sizes (SO_SNDBUF, SO_RCVBUF) that will be
disabled if you specify a socket buffer size. This can
potentially cripple your TCP/IP stack.

Getting the 'socket options' correct can make a big
difference to your performance, but getting them wrong
can degrade it by just as much. As with any other low
level setting, if you must make changes to it, make
small changes and test the effect before making any
large changes.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
dns proxy = No
local master = No
log file = /var/log/samba/%m
map to guest = Bad User
max log size = 50
preferred master = No
security = USER
server string = Samba Server %v
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
idmap config * : backend = tdb


[Test Share]
create mask = 0755
path = /mnt/testshare
read only = No
valid users = mike

I am convinced the issue is not with the smb.conf file, it is something more fundamental than that.

2 Answers 2

1

This is the simplest samba configuration that I know of. Save your old smb.conf and make a new one that looks exactly like this test whether machines can now access

[global]
        map to guest = Bad User

        log file = /var/log/samba/%m
        log level = 1
workgroup = your workgroupname
       netbios name = name of your server
       server string = Samba Server %v
        max log size = 50
       socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
       preferred master = No
       local master = No
       dns proxy = No
       security = user

[name of your share]
        path = /mnt/name of your folder where the shared drive is mounted
browseable = yes        
read only = no
        valid users = some username, some other username 
    create mask = 0755
    directory mask = 0755

With that you should be able to get a user to logon the network and access a shared folder

make sure your drives and shared folders are mounted in /mnt/ not your home folder

Let me know if you can access like that

Edited in after

What I would be doing now, if I was you is to check permissions on mount points, checking that the clients, users, and server all have sufficient permissions, and that there are no mistakes in the config files I would also ensure that the network settings had the proper gateway and DNS settings etc. All I can really suggest is that you look over the configuration files as though you were setting up the network afresh. Experience tells me that this problem is something to do with permissions though. Either incorrect ownership or incorrect groups on the shared directories at least that's what my instinct says. If that proved to be incorrect I would move onto the config files, however I cannot see, after a quick perusal of your config files what might be wrong in them

1
  • I have added to my question as there is not enough space proved here.
    – Jedi
    Jan 10, 2019 at 2:50
0

Ok I figured it out.

sudo service ufw start

I had previously allowed Samba through the firewall. How disabling a firewall could stop Samba working I do not understand.

Anyway after I got all my shares working I noticed smbtree was producing no output. I fixed that by following this tutorial here.

There is also a really good tutorial on the correct way to set Samba up here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .