8

Just installed a fresh Ubuntu 16.04, and Samba. I want to share a drive with Windows machines, with anonymous users.

First thing I notice is the Samba configuration GUI (system-config-samba) is no longer available.

I forged ahead with the CLI and Nano, editing /etc/samba/smb.conf, using various bits of information from many other people struggling with the same issues.

I have it to the place where Windows machines can see the machine and the shared folder, but any attempt to open the share results in "Access Denied". I want the share to be anonymous, but I also tried logging in using the Ubuntu user and password, and still "access denied".

Before I get into all the gory details after several hours of trying, what happened to the GUI config? If it is just under another name, I'll try that first.

Update: It turns out there is an even easier way to configure sharing in 16.04 Unity. Just right click on the folder to share and select "Local Network Share". From there, the Folder Sharing dialog opens to configure the sharing.

Unfortunately it doesn't work (remote user authentication always fails), but at least the interface is there. I'll report back if and when I figure out more.

10

To get a GUI to configure Samba I installed system-config-samba. It was crashing. I looked around a bit… What worked for me was creating the missing file libuser.conf in /etc. So I typed in terminal:

sudo touch /etc/libuser.conf

Source: https://ubuntuforums.org/showthread.php?t=2250379

  • Same problem here. For the record, still working solution under Lubuntu 17.10. Thanks. – KO the typo Apr 14 '18 at 17:36
  • Ubuntu 18.04 in almost 2019. Still sucking. Saved me – Abhishek Dujari Dec 26 '18 at 16:53
8

Simply right click the folders in your home and enable local share, it will offer to install samba files. After that, in a terminal run sudo smbpasswd -a username (where username is existing UNIX username) and set your password and reboot.

  • 1
    Bingo - smbpasswd was the issue. I've been through configuration guides for Samba, and I guess I missed the fact that Samba keeps a separate database of users and passwords. That explains why it rejected the login with a valid linux username and PW. I still don't know why anonymous login doesn't work - that's what I was trying to accomplish. – tim11g Jun 14 '16 at 18:10
  • 1
    Earlier libpam-smbpass would synchronize your existing password with samba password but that has been taken out. – Arup Roy Chowdhury Jun 15 '16 at 1:56
  • Thanks a lot. I configured file sharing in nautilus but was unable to access any folders I shared. It works after I added the samba user! (I thought they would add my current user as a samba user by default) – Liu Siyuan Nov 26 '16 at 8:28
  • No need to reboot either. Simply adding user does the trick. – Jus12 Jul 9 '17 at 19:15
3

Installing system-config-samba is not a problem. I installed it using synaptic - just clicked "mark for installation" and "apply" and bingo. The problem is that once installed, it does not work. First, it doesn't show up in the launcher, or the classic menu, or in system settings. (At least, I can't find it.) Second, when run from the command line, it produces the following error message:

duncant@linuxbox:~$ system-config-samba0
Traceback (most recent call last):
  File "/usr/sbin/system-config-samba", line 45, in <module>
    mainWindow.MainWindow(debug_flag)
  File "/usr/share/system-config-samba/mainWindow.py", line 116, in __init__
    self.samba_user_data = sambaUserData.SambaUserData(self)
  File "/usr/share/system-config-samba/sambaUserData.py", line 46, in __init__
self.readSmbPasswords()
  File "/usr/share/system-config-samba/sambaUserData.py", line 63, in    readSmbPasswords
    raise RuntimeError, (_("You do not have permission to execute %s." % pdbeditcmd))
RuntimeError: You do not have permission to execute /usr/bin/pdbedit

Doesn't work when run with sudo privilege either:

duncant@linuxbox:~$ sudo system-config-samba
[sudo] password for duncant: 

(system-config-samba:15161): IBUS-WARNING **: The owner of /home/duncant/.config/ibus/bus is not root!
Traceback (most recent call last):
  File "/usr/sbin/system-config-samba", line 45, in <module>
    mainWindow.MainWindow(debug_flag)
  File "/usr/share/system-config-samba/mainWindow.py", line 121, in __init__
    self.basic_preferences_win =   basicPreferencesWin.BasicPreferencesWin(self, self.xml, self.samba_data,   self.samba_backend, self.main_window)
  File "/usr/share/system-config-samba/basicPreferencesWin.py", line 97, in __init__
    self.admin = libuser.admin()
SystemError: could not open configuration file `/etc/libuser.conf': No such file or directory

However, I was able to get samba file sharing to work simply by right clicking on the folder I wanted to share in the ubuntu file manager, selecting Properties, then "Local Network Share".

This works fine for open guest access, but for authenticated access you also need to run the smbpasswd command.

So, bottom line, system-config-samba doesn't seem to work "out of the box" on ubuntu 16.04

1

The package system-config-samba is available at the universe repository. Enable the Community-maintained free and open-source software (universe) box at Software & Updates under Ubuntu Software tab. Then click reload after you close it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.