Samba not working (fixed)

I’ve just installed Mate on my emachines laptop. First job was to get samba working so it can connect to the PC, where samba is working fine.
It all looked good “windows network” came up with “workgroup” and the printer share. So then I had a go at smb.conf to change workgroup and add my home directory. After doing that clicking on “windows network” just gave me this, “Failed to retrieve share list from server: No such file or directory” Tried a few things incuding the smb.conf from 14.04. All to no avail, so I tried removing and reinstalling with App Grid. I then got an install error, so I tried the same thing with apt-get and got this during the process.
" >>>>>>>>> Preparing to unpack …/attr_1%3a2.4.47-2_amd64.deb …
Unpacking attr (1:2.4.47-2) …
Selecting previously unselected package libaio1:amd64.
Preparing to unpack …/libaio1_0.3.110-2_amd64.deb …
Unpacking libaio1:amd64 (0.3.110-2) …
Selecting previously unselected package samba-dsdb-modules.
Preparing to unpack …/samba-dsdb-modules_2%3a4.3.9+dfsg-0ubuntu0.16.04.1_amd64.deb …
Unpacking samba-dsdb-modules (2:4.3.9+dfsg-0ubuntu0.16.04.1) …
Selecting previously unselected package samba-vfs-modules.
Preparing to unpack …/samba-vfs-modules_2%3a4.3.9+dfsg-0ubuntu0.16.04.1_amd64.deb …
Unpacking samba-vfs-modules (2:4.3.9+dfsg-0ubuntu0.16.04.1) …
Processing triggers for man-db (2.7.5-1) …
Processing triggers for libc-bin (2.23-0ubuntu3) …
Processing triggers for ureadahead (0.100.0-19) …
Processing triggers for systemd (229-4ubuntu4) …
Processing triggers for ufw (0.35-0ubuntu2) …
Setting up python-dnspython (1.12.0-1) …
Setting up tdb-tools (1.3.8-2) …
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
Setting up samba (2:4.3.9+dfsg-0ubuntu0.16.04.1) …
Job for smbd.service failed because the control process exited with error code. See “systemctl status smbd.service” and “journalctl -xe” for details.
invoke-rc.d: initscript smbd, action “start” failed.
dpkg: error processing package samba (–configure):
subprocess installed post-installation script returned error exit status 1
Setting up attr (1:2.4.47-2) …
Setting up libaio1:amd64 (0.3.110-2) …
Setting up samba-dsdb-modules (2:4.3.9+dfsg-0ubuntu0.16.04.1) …
Setting up samba-vfs-modules (2:4.3.9+dfsg-0ubuntu0.16.04.1) …
Processing triggers for libc-bin (2.23-0ubuntu3) …
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
[email protected]:~$ "

I’ve tried searching for systemctl and journalctl but they don’t seem to exist.

Samba didn’t work all that well on this machine in 14.04, i couldn’t get it to share any of it’s folders. So Maybe hardware has something to do with my problems?
I used very similar steps to get samba working on the PC and that’s fine.

Hi @decrepit,

try reading here:

https://help.ubuntu.com/community/Samba/SambaServerGuide

and here:

https://help.ubuntu.com/lts/serverguide/samba-fileserver.html

I don’t do it myself otherwise I would offer some advice!, actually I do have some advice, don’t bet on 3 legged horses!. :smiley:

Thanks again wolfman, seems lots of people are having trouble with the latest samba update, may be part of my problem even though the PC is working fine.

I’ve taken your advice onboard and will proceed with caution, but I think if I do ever bet on a three legged horse, it will be for it to come in last. (unless of course there are any two legged horses in the race)

1 Like

Have you tried using System->Administration->Samba?

The file /etc/libuser.conf is missing or has the wrong permissions

I found this solution in an earlier thread from: > straycat_tim15h

If you installed system-config-samba and can’t get it to open start a terminal and type sudo pluma /etc/libuser.conf don’t add anything to the file just save and close it samba config then worked for me.Samba will then show up in the control panel under administration.

1 Like

Thanks Wally, yes I saw that, system config Samba is working fine, and I haven’t fallen into the “security share” trap either. I’m more and more inclined to think it’s a hardware issue, although everything else works fine.

FIXED it!!!
Used the mend broken packages button, then removed and reinstalled with apt-get. That went well this time, no errors reported. So did app grid do a bad job of removing and reinstalling, or has a bug in samba just been fixed?
Then used samba config instead of samba.conf to add a couple of shares. Not a problem at all works fine.
So is there a button to mark this thread solved?

Yes, the checkbox next to your last post. :D
Congrats on solving it.
Cheers

I’ve never heard of App Grid, I’m betting on it being the problem over a showstopper bug in Samba – too many people use it everyday, there would be a lot more traffic about the problem. Most Samba updates are for security or advanced features rarely needed in “home” networks, and have been for a long time.

My problem was a bug in the configuration tool, I didn’t want to edit smb.conf directly unless I had to.

I hadn’t heard of it either until this week. It’s in the “more software” section of the software boutique.

Seems the “fixed” did not work well for me and I guess it is the same for many as well. Not that it was not possible because I had samba working on one version of my Ubuntu Mate installations without the previous instructions in that thread, and I was not able to do it again or else apply successfully the instructions that appear on this thread!

Through many reinstallations from scratch, I finally found the way to get samba to work on a new installation of Ubuntu Mate 16.04. I can create the smb shares in such a way that I can connect to them from a MacOS system with a username/password combination. Previously, the only way to connect to any share was using anonymous and open connection and the Caja Share options were not able to solve anything.

Here is the sequence from a fresh start. Others may find variations and may explain the reason why this sequence at least makes it work so we can build the rest of the options and additional software right… I think “Caja Share” smb options are not fully populated for access rights and you need to use the “Shared Folders” right from the main menu instead. The problem might only be that you need to find it, but for now I cannot conclude, you may still have to correct the famous “/etc/libuser.conf” file properties bug to be successful. Anyways, here a sequence that works from scratch.

  1. Install a brand new Ubuntu Mate 16.04 on your Raspberry Pi by booting the Pi on a freshly installed Ubuntu Mate 16.04 disk image.

  2. Once up and running in your environment, Open a Terminal Window and type the following:
    sudo apt-get update
    (provide your password to accept the superuser command
    and wait until the package info update is done)
    sudo apt-get purge brltty
    (not necessary: this is to get rid of the Braille support package that fills the system log
    with errors on the Braille device driver)
    sudo apt-get install samba
    (wait until samba and its dependencies are installed)
    sudo touch /etc/libuser.conf
    (this is to repair wrong properties on this file that apparently jams many samba configurations)

  3. Go to the “Shared Folders” option within the “Administration” portion that appears at the top of System/Control Center. You will first need to unlock it with the small padlock that appears at the bottom. Create your share there and make sure the users have access rights by adjusting the permissions portion of the menu to make it available to you as well.

  4. You can also make “Shared folders” appear in your “System” menu by selecting it within the “Main Menu” options.

Hope this initiates a better understanding, in the meantime, it might just be a workaround.

I’ve had samba problems off and on in various distributions. Since 14.04 this usually works for me
(in Mate 14.04, 16.04, freya 0.3.2 based on 14.04 and other distributions)

Remove Samba if already installed
In terminal

sudo apt-get install gksu

sudo apt-get install samba samba-common

sudo apt-get install system-config-samba cifs-utils

Then manually create file:libuser.conf in folder /etc.
sudo touch /etc/libuser.conf

reboot

Then you can get to the samba gui and create shares.