For some reason I've never been able to get Network shares working on Ubuntu, 12.04 nor 14.04. Although I have the desktop version, I've followed the server sharing advice here with no luck. The problem is the same on my wife's computer and the laptop. Shouldn't this just work out of the box?
I can't even get access to my shared folders through the "Browse Network" link from my own machine. Should I give up and use NFS?
Here's my smbtree and smbstatus output.
WORKGROUP
\\JAMES-UBUNTU james-ubuntu server (Samba, Ubuntu)
\\JAMES-UBUNTU\IPC$ IPC Service (james-ubuntu server (Samba, Ubuntu))
\\JAMES-UBUNTU\Photosmart_Plus_B210 Photosmart_Plus_B210
\\JAMES-UBUNTU\print$ Printer Drivers
\\JAMES-UBUNTU\shareme James Public Share
james@james-ubuntu:~$ smbstatus
Samba version 4.1.6-Ubuntu
PID Username Group Machine
-------------------------------------------------------------------
Failed to initialize session_global: NT_STATUS_ACCESS_DENIED
Service pid machine Connected at
-------------------------------------------------------
Failed to initialize session_global: NT_STATUS_ACCESS_DENIED
Failed to traverse sessions: NT_STATUS_ACCESS_DENIED
No locked files
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):
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:
samba gui:
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:
have this installed if its not already:
create samba user and password (I used my linux account user and password):
(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):
Almost there:
LAST LINE: Important.
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...
"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! :-)