My answer doesn't directly relate to the error but to how to get sharing working. I had run up against the error BTW during this and so it does fix it in the end. Just not clearly so...
For Ubuntu 14.04 samba server and Ubuntu client it is possible to get it working. The method I wanted doesn't need a login...
My notes on this are a bit of a mess because of the sheer amount of configuration tests and trials that were made, No idea if some of it or all of it is required at this time and have steps for adding username and password as well. It was all a fail until the last line where I found smb:// was the only way it worked. Plus, no want to narrow it down:
You should try the last line first or use that through the process till it works. Simply going to browse network just doesn't ever seem to work otherwise as it puts up a login window that doesn't seem to allow access.
get latest samba (4.1.11) currently not found in ubuntu packages (may be necessary):
sudo add-apt-repository ppa:martinx/ig
sudo apt-get update
sudo apt-get upgrade samba
Ubuntu Applications "Personal file sharing":
check "Share public files on network"
Require password "always"
Password "thesamepassword" used for user below
get the samba gui: ????? Might be needed to configure via here. Really don't know if it made a difference. I used a reboot to get it to show up in ubuntu applications:
sudo apt-get install samba libpam-smbpass samba-dsdb-modules samba-vfs-modules python-samba samba-common-bin samba-common samba-libs nautilus-share libgnomevfs2-extra
Preferences -> Server settings -> security tab:
Auth mode: User, Encrypt passwords: yes, Guest: nobody
Preferences -> samba users:
Same user as added below. Might to delete user below by changing -a to -x if added prior to.
If you have a permission error, this should fix it - though not the most secure way to do so and personally I do not care about this on my pc:
sudo chmod 777 -R /var/log/samba/* Needed????? No reason unless you need to.
have this installed if its not already:
sudo apt-get install libpam-smbpass
create samba user and password (I used my linux account user and password):
sudo smbpasswd -a user_to_add
sudo gedit /etc/samba/smb.conf
(starting with a fresh default smb.conf file and make the following changes (copy /usr/share/samba/smb.conf to /etc/samba/ if needed) (semicolon lines are ignored BTW):
force user = user_to_add #<---------------- ********** CHANGE **********
; passdb backend = tdbsam
usershare allow guests = yes
username map = /etc/samba/smbusers
security = user
; encrypt passwords = yes
; guest account = user_to_add
; comment = Home Directories
; browseable = yes
read only = no
create mask = 0755
; directory mask = 0755
guest ok = yes
sudo samba restart
sudo restart smbd && sudo restart nmbd
or restart pc?
Go to a folder in home dir
right click -> local net share
Check "share this folder"
Check "Allow others to create..."
Check "Guest access"
Click create share
LAST LINE: Important.
browser or file explorer -> connect to server then:
smb://IP address of pc with samba server. (smb://192.168.1.99)
You can then bookmark it as well. Right click on it under network on the left of file explorer and bookmark.
There could be another way and the mess could be narrowed down, but after many hours this was the first time it worked and hopefully will not need to touch it till next LTS or so - if ever.
This is also usable on android without login.
On windows need to go to network explorer and type into the location field \\IP address of pc with samba server (\\192.168.1.99) and no login is needed.
Have fun :-D
Update: I had to do it again and this time doing it with 16.04 daily build
For 16.04 pre-release its mostly the same with a few slight differences...
sudo systemctl restart smbd.service && sudo systemctl restart nmbd.service
"Personal File Sharing" in Ubuntu applications isn't needed and isn't working properly.
Samba is at the latest release and doesn't need the ppa (at the moment I type this) BUT, make sure to install samba through whatever means necessary.
Samba gui isn't needed and thus probably not needed 14.04 either
I followed what's left above and the shared folder is showing up and browsable, write, and readable in Linux 14.04 (connection: anonymous) and Windows 10.
Windows 10: File explorer -> right click 'network' -> map network drive -> \IPaddress\shared folder name (or \IPaddress then click browse - but it looks like only one share folder per drive letter)
If using Windows 10 network backup and restore it requires a username and pass, just enter the samba ones and its ok (probably can be anything though) MAKE BACKUPS PEOPLE! :-)