Ubuntu

Shared folders (through Samba) when following instructions sometimes does not work correctly

Reported by Paddy Landau on 2010-06-11
156
This bug affects 32 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Medium
Unassigned
Nominated for Lucid by Pascal Schaefer
Nominated for Maverick by David M Pratt

Bug Description

Binary package hint: samba

SUMMARY:

Following instructions to create a shared folder through Nautilus (right-click > Sharing Options > Share this folder, and following the subsequent prompts) does not always work.

For some people, it works immediately. For other people, a solution has been found, which requires extra steps.

I found this a problem across a small network of five computers:
- one 64-bit Ubuntu (Lucid 10.04)
- two 32-bit Ubuntu (Lucid 10.04)
- one 32-bit Xubuntu (Lucid 10.04)
- one Windows Vista.
Every Ubuntu computer had the identical problem.

Other people have reported having this problem. Examples:
http://ubuntuforums.org/showthread.php?t=1491092
http://ubuntuforums.org/showthread.php?t=1502265

SYMPTOMS:

When it works, everything works properly and quickly. But when it does not work...

The shares appear to be created correctly. Using terminal commands, it is found that the machines do in fact connect. However, in Nautilus, the network takes approximately a minute to respond and then fails to find the shares.

DISCOVERED SOLUTION:

1. Add the following two lines under the [global] section in file /etc/smb.conf in every Ubuntu and Xubuntu machine:
os level = 33
name resolve order = bcast host lmhosts wins

2. Reboot.

3. Some people find that they have to experiment with the order of items in "name resolve order".

EXTRA INFORMATION:

Package versions according to Synaptic (from the default repositories):
- samba 2:3.4.7~dfsg-1ubuntu3
- nautilus-share 0.7.2-12build1
- system-config-samba 1.2.63-0ubuntu4

REQUIRED ACTION:

Shared folders should work through the GUI without workarounds and fiddling, just as Windows and Mac do. It should not be necessary to get onto the forum, search, and mess with /etc/smb.conf. (It took over a week for me to discover the answer.)

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: samba 2:3.4.7~dfsg-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
Architecture: amd64
CheckboxSubmission: 5bf569339afeaacf6d8dcc180d0a06f0
CheckboxSystem: b1865df84255b8716d3bcc269ff410d1
Date: Fri Jun 11 11:33:18 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions:
 nautilus 1:2.30.1-0ubuntu1
 gvfs 1.6.1-0ubuntu1build1
SambaClientRegression: Yes
SourcePackage: samba

Paddy Landau (paddy-landau) wrote :
summary: - Shared folders (through Samba) when following instructinos sometimes
+ Shared folders (through Samba) when following instructions sometimes
does not work correctly
Garthhh (gchoyman) wrote :

When I try to do a simple share of documents folder & get an error:
'net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. The connection was refused. Maybe smbd is not running.
if I do a search of synaptic there is a samba4
which is described as an experimental package

Chuck Short (zulcss) on 2010-06-14
affects: samba (Ubuntu) → nautilus (Ubuntu)
affects: nautilus (Ubuntu) → nautilus-share (Ubuntu)
Chow Loong Jin (hyperair) wrote :

Looks more like a name resolution and presence detection issue more than a configuration issue, so I'm reassigning to samba.

affects: nautilus-share (Ubuntu) → samba (Ubuntu)
Kiren Pillay (kirenpillay1) wrote :

How do I vote for this bug? I am also affected. Every release of Ubuntu I've installed so far (from 8.04) has had an issue with samba! This should be seamless.

Garthhh (gchoyman) wrote :

There are also some other related threads:
Paddy Landau's thread
http://ubuntuforums.org/showthread.php?t=1491092
with a work around

Wolfrage's better solution:
http://ubuntuforums.org/showthread.php?t=1502265

A bug [please subscribe]:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/592610

My thread from a couple of weeks ago:
http://ubuntuforums.org/showthread.php?t=1491180

The community of developers has spent many hours developing this capability, too bad it doesn't work, without a bunch of fiddling around on the command line

If you are reading this & would like to be able to share files with a couple of mouse clicks, post a comment on the threads & especially the bug

Paddy Landau (paddy-landau) wrote :

> How do I vote for this bug?

At the top, under the heading, there is a question in green: "This bug affects 2 people. Does this bug affect you?" Click it and answer the question.

Mathias Gug (mathiaz) on 2010-06-15
Changed in samba (Ubuntu):
importance: Undecided → Medium
Garthhh (gchoyman) wrote :

I'll go through the whole thing from scratch, following instructions as I get them from the GUI & see where it gets me
I just walked into the other room & sat down at an ol Pentium III pc that is hooked to my printer. I added Mint9 [last week] to this PC, because it's easier to use than 10.04 using the graphical interface. I can generally stick to using software from the manager & synaptic. I update usually within a few hours of when I notice there is a notifications.
I went to my home folder & right clicked documents, clicked share options
got asked for permission [root I guess], gave it
told I needed other packages & was asked if wanted to install the packages to do windows shares, clicked install
Samba & lib-something[dependency] installed
I filled in the share popup
the icon now shows an outstretched hand
went to my other computer I don't see any other computers on the network?
I go to network & click through the menus, don't see anything that appears to be relevant
I go to system[control center in mint] click Personal file sharing & get a message
"this feature cannot be enabled Because the required packages are not installed on your system"
I go to help, which says
I should go to startup preferences
I scroll through the list & see that personal file sharing is enabled
at this point I'm at an impass, so
I go have a look at synaptic & type personal file sharing into search, no results
change to file sharing, 65 results
I scroll through the list & see 9 of them are already installed
File
Gnome-user-share
Giver
Samba Common
Libwclient
Samba Common-bin
Samba Client
Samba
I'll stop here for the time being at least on the PC which has not had a bunch of stuff installed

at the very least the help file & or on screen prompts should lead you to successfully sharing 1 folder, it should be a little more difficult to share the entire home folder just for security sake

It's a shame to be so close & not go the rest of the way with graphical method of file sharing that doesn't require finding information through searching forums or the rest of the internet.
this basic task should be described adequately on help or through prompts/error messages within the process of right clicking a folder.

I understand that when you deal with the intricacies of an operating system on a day to day basis, it can be difficult to look at things with the eyes of a newbie
Let me know if there is any way I can help? :)

Dave M (davem-mich) wrote :

I have had this problem since I started using SAMBA in v6.06, I am now using v10.04 and configuring SAMBA is still a problem. Getting the computers to discover each other, so they are listed in "Places-Network" is a pain. Sometimes it works. Sometimes it works after a long delay and sometimes they never find each other. I do not know much about Windows networking but I think the problem may be related to not having a Windows machine running wins. My network is all Ubuntu and only has Windows connected occasionally.

Garthhh (gchoyman) wrote :

my notebook had powered down
when I restarted I had an icon for the documents on my pc [the share I set up above]?
but of course the other 2 computers are still awol

Chuck Short (zulcss) on 2010-06-23
Changed in samba (Ubuntu):
status: New → Confirmed
Garthhh (gchoyman) wrote :

one of the missing steps is the installation of the GUI for samba...
shouldn't this show up as a dependency for the packages needed to share that get installed within the process of that 1st right click & some popped up instructions?

Jordan Farrell (wolfrage) wrote :

I am posting just to mention that I have had problems with file sharing since I came to Ubuntu. I hope that this will be fixed whether we use Nautilus-Share or Samba; just so long as it works consistently and easily. As Garthhh pointed out I made a short how to on the method that worked for me using Samba. http://ubuntuforums.org/showthread.php?t=1502265 But that thread continues to grow with more users reporting problems than the actual number of affected users listed here in the bug report.

TonyR (rooneyo) wrote :

I want to ask what kind of testing proceeds a release of Ubuntu as it appears that 10.04 is totally bug ridden with serious problems. Burning disks does not work and now it appears sharing folders is also bug ridden.

SAMBA seems to be permanently broken. How can it be so hard to get this working as it is a most important feature of the system. It is so disappointing to see Ubuntu undermined by such sloppy careless release processes.

Getting a USB wireless network running was a soul destroying 26 hour process over 4 days and many posts to forums and getting a TV card recognized and working a similar nightmare.

As far as WINE actually running Windows applications, well I have yet to see this work reliably in 5 years and several different distributions and versions.

TonyR (rooneyo) wrote :

Hi

I do not have /etc/smb.conf on this machine so have no option to use the suggested work-a-round..

I will check the other machine

Garthhh (gchoyman) wrote :

Hi Tony,
I made a slight change to the 1st step, install
system-config-samba

Warning, this method is not for unsecured networks

I found this method here:
http://ubuntuforums.org/showthread.php?t=1502265
Thanks to Wolfrage
1. "Applications" menu ->"Ubuntu Software Center" -> in the search box type "Samba" then install "system-config-samba". ( this installs Samba & the "Samba" GUI.)
2. "System" menu -> "Administration" -> "Samba". Enter your password. In the GUI that opens up choose "Preferences" menu -> "Server Settings" then the "Security" tab change the authentication mode to share and the guest account to your user name account. This prevents permission problems later on.
3. Choose the "Add a Samba Share"; the green plus icon; browse to the directory you wish to share. Place a check mark in "Writable" and "Visible". Then on the "Access" tab choose "Allow access to everyone".
4. Press OK; now your should be able to see the share from the other computers just choose "Places" menu -> "Network" then either the computer name if it shows up or select "Windows Network" -> "WORKGROUP" -> Computer Name then the Shared folder.

David M Pratt (flashpratt) wrote :

nominated for Maverick by mistake. :/ sorry guys I failed to see "Does this bug affect you?"

Blue_Bullet (nrburness) wrote :

This will significantly add to "egg on face" if it is allowed to carry over into Ubuntu 10.10. I have no idea what is happening with my file sharing attempts. It seems to change from one machine shut down to the next. If you look at the threads on this, the confusion is varied. No excuse for implementing basic services like this.

I do not see any attempts to fix the bugs either. Seems a step back and use one approach might be a good one to take. Just pick one method and go with it or make certain different methods if allowed do not interfere with each other. That's pretty basic software development.

phawxhurst (phawxhurst) wrote :

I have a windows xp pro network on acer desktop, + hp & everex laptops each with xp/ubu 10.04.
from the ubus can access xp files on desktop and other laptop when it is in xp mode.
ubus do not see each other??
I have tried nearly every thread w/o success.
any suggestions, thanks Peace. Pete

Chris Routh (routhinator) wrote :

I am posting to comment that not only has this bug carried through to 10.10, it has now continued into the 11.04 base. I reinstalled Ubuntu 11.04 four times on one system and the issue occurred every time. As a tech that promotes Ubuntu, I find it embarrassing that a fix has not yet been implemented in over a year.

Paddy Landau (paddy-landau) wrote :

I think the Importance of this bug should be raised from Medium.

It is vital to have a system in today's world connect seamlessly and effortlessly with other systems. I know it is outrageous that Microsoft does not use agreed standards, but it's the way it is, so we have to connect with Windows.

William S Gregory (0c-bill) wrote :

 Yes sir, still seeing it. Seems to be an issue when you've got at least two servers on the same subnet. Tell it to use 'bcast' before the system default (usually the isp's dns), in each smb.conf; and it works.

There are several potential issues at work here.

My first experience with SAMBA was with 11.04. After spending several hours on the Samba website learning about it and smb. It's clear that the changes necessary to make it "just work" in a gui browser necessitate a non-stock configuration for SAMBA. That is to say, knowing SAMBA as it was designed isn't enough to understand the Ubuntu implementation. This confuses the issue if one is trying to troubleshoot but has no access to documentation of what they did to make it work in Ubuntu.

Another issue is the same old tired monster. The reason why so many Ubuntu veterans scream the battle-cry: "Do A Clean Install!". Human error. Every version upgrade I've done has carried some problem or other that is most likely due to either a maintainer error in a previous revision, an error in the update itself, or lack of proper communication between maintainers (that documentation I mentioned earlier). So, somewhere along the development pipeline no one remembers that a smb-native server uses "bcast" to get what it needs: name-address resolution.

Funny thing is, I went over 30 years of my life knowing next to nothing about tcp/ip. Then my first stab at SAMBA fails. Less then half-way through Tcp/Ip for Dummies, and I figured out the problem. It only took $30 and 80 pages....LOL

I agree with Paddy Landau that a respectable OS is expected these days to be able to connect to shared folders (on at least the three main OSs) with little or no user intervention. Once the computer and workgroup are entered, and perhaps whether DHCP is being used, the configuration files should be automatically tailored to suit the situation the system finds itself in.

koanhead (googoleyes) wrote :

I have discovered that using the GUI to share a folder (via right-clicking in Nautilus) does not make any changes to smb.conf - I'm not sure where the information is stored, but I'm guessing it's somewhere in gconf (a quick check in gconf-editor didn't turn it up, but I'm not a gconf expert).
Splitting up configuration data like this is Bad and Wrong, especially if the share doesn't work right at first and the user then goes and edits smb.conf manually. If your testparm output does not agree with the output of net usershare logon then that could be a sign of this split configuration issue.
IMO this is a bug in Nautilus (one I haven't filed yet, but that's my next stop). GNOME should not split configs. If config data *must* be kept in gconf then it should be sync'd with the existing config files.

sdowney717 (sdowney717) wrote :

Samba is crashing when i reboot, and crashing when I make changes using the gui

scott@scott-P5QC:~$ sudo system-config-samba
invoke-rc.d: unknown initscript, /etc/init.d/samba not found.
invoke-rc.d: unknown initscript, /etc/init.d/samba not found.
scott@scott-P5QC:~$

also, nautilus shares dont show up in the gui, a disconnect, not integrated which is bad.

sdowney717 (sdowney717) wrote :

That is on 12.04. I really dont have a clue of what to do anymore with samba, and it used to work about a month ago.

Paddy Landau (paddy-landau) wrote :

@sdowney717 — your problem is unrelated to this bug. I suggest that you ask your question on Ubuntu Forums [1] or Ask Ubuntu [2].

    [1] http://ubuntuforums.org/
    [2] http://askubuntu.com/

John Rose (johnaaronrose) wrote :

Same problem. Even more interseting is that it's OK on one PC but not another, both using 12.04 32 bit!

are you referring to root share or usershare? root shares work properly and they are meant to be done by fiddling with smb.conf

user share via nautilus does not work properly

private shares with password (its automatically your login password) work.

public (guest) shares in the home directory dont work because samba cannot cd into /home because /home defaul permissons are to strict for "nobody" which is the guest/public samba user.

i had a long talk with the maintainer of nautilus-share. there are several possible fixes.

1. set homedirectoy permissons for "eveyone else" properly
2. add force user = owner of the /home/'your username' directoy to smb.con and map to guest = bad password

Download full text (5.4 KiB)

On Thu, May 16, 2013 at 2:30 PM, julius von kohout <
<email address hidden>> wrote:

> are you referring to root share or usershare? root shares work properly
> and they are meant to be done by fiddling with smb.conf
>

I don't understand the distinction you're making.
This bug report was about attempting to share files in Nautilus- is that a
'root share' or a 'usershare'?

I don't have the old setup to test any more. I've since rebuilt the
computer and it now runs Debian Sid.
The samba shares are the same, but I did not try to use Nautilus to set
them up (I use xfce now).

What I was trying to accomplish was an anonymous public read-only share on
/media/share. It didn't work then (using Nautilus) and it doesn't work now
(having tried via editing smb.conf and using 'net usershare'). Samba
currently doesn't work at all: when I try to connect, I get error "could
not download share list from server".
When it does work (apparently at random), samba *always* prompts for a
username and password, regardless of configuration. When configured with
username and password, it sometimes works and sometimes does not.

The workaround cited in my report stopped working a day or so later. I
should have updated the report at that time, but the bug was marked
'invalid' anyway and I was too discouraged to mess with it any further. I
don't need samba for authenticated shares, sshfs works fine for that.

Thanks for the information and advice, I'm sorry that it doesn't apply more
directly to the situation at hand. I tried to test permissions for 'nobody'
on the shared directory, but I can't su to nobody. The directory's mode is
744 if that helps.

> user share via nautilus does not work properly
>
> private shares with password (its automatically your login password)
> work.
>
> public (guest) shares in the home directory dont work because samba
> cannot cd into /home because /home defaul permissons are to strict for
> "nobody" which is the guest/public samba user.
>
> i had a long talk with the maintainer of nautilus-share. there are
> several possible fixes.
>
> 1. set homedirectoy permissons for "eveyone else" properly
> 2. add force user = owner of the /home/'your username' directoy to smb.con
> and map to guest = bad password
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/592610
>
> Title:
> Shared folders (through Samba) when following instructions sometimes
> does not work correctly
>
> Status in “samba” package in Ubuntu:
> Confirmed
>
> Bug description:
> Binary package hint: samba
>
> SUMMARY:
>
> Following instructions to create a shared folder through Nautilus
> (right-click > Sharing Options > Share this folder, and following the
> subsequent prompts) does not always work.
>
> For some people, it works immediately. For other people, a solution
> has been found, which requires extra steps.
>
> I found this a problem across a small network of five computers:
> - one 64-bit Ubuntu (Lucid 10.04)
> - two 32-bit Ubuntu (Lucid 10.04)
> - one 32-bit Xubuntu (Lucid 10.04)
> - one Windows Vista.
> Every Ubuntu computer had the identical problem.
>
...

Read more...

Via nautilus is usershare. Via smb.conf is root share. Try to set permissions of home to 755 and make a share /home/public
If you make a public share samba uses nobody/other as user to change to that directory. Its the last digit of dir permissions that is used. You can see that if you run samba with debug level.
 But the best way is to use the smb.config edits from above the you can share folders in /home and external ext4 drive like i do.

koanhead (googoleyes) wrote :
Download full text (3.7 KiB)

On Fri, May 17, 2013 at 3:36 PM, julius von kohout <
<email address hidden>> wrote:

> Via nautilus is usershare. Via smb.conf is root share.

Cool, thanks!

> Try to set permissions of home to 755 and make a share /home/public
> If you make a public share samba uses nobody/other as user to change to
> that directory. Its the last digit of dir permissions that is used. You can
> see that if you run samba with debug level.
>

OK, I will try that sometime this weekend and report back.

>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/592610
>
> Title:
> Shared folders (through Samba) when following instructions sometimes
> does not work correctly
>
> Status in “samba” package in Ubuntu:
> Confirmed
>
> Bug description:
> Binary package hint: samba
>
> SUMMARY:
>
> Following instructions to create a shared folder through Nautilus
> (right-click > Sharing Options > Share this folder, and following the
> subsequent prompts) does not always work.
>
> For some people, it works immediately. For other people, a solution
> has been found, which requires extra steps.
>
> I found this a problem across a small network of five computers:
> - one 64-bit Ubuntu (Lucid 10.04)
> - two 32-bit Ubuntu (Lucid 10.04)
> - one 32-bit Xubuntu (Lucid 10.04)
> - one Windows Vista.
> Every Ubuntu computer had the identical problem.
>
> Other people have reported having this problem. Examples:
> http://ubuntuforums.org/showthread.php?t=1491092
> http://ubuntuforums.org/showthread.php?t=1502265
>
> SYMPTOMS:
>
> When it works, everything works properly and quickly. But when it does
> not work...
>
> The shares appear to be created correctly. Using terminal commands, it
> is found that the machines do in fact connect. However, in Nautilus,
> the network takes approximately a minute to respond and then fails to
> find the shares.
>
> DISCOVERED SOLUTION:
>
> 1. Add the following two lines under the [global] section in file
> /etc/smb.conf in every Ubuntu and Xubuntu machine:
> os level = 33
> name resolve order = bcast host lmhosts wins
>
> 2. Reboot.
>
> 3. Some people find that they have to experiment with the order of
> items in "name resolve order".
>
> EXTRA INFORMATION:
>
> Package versions according to Synaptic (from the default repositories):
> - samba 2:3.4.7~dfsg-1ubuntu3
> - nautilus-share 0.7.2-12build1
> - system-config-samba 1.2.63-0ubuntu4
>
> REQUIRED ACTION:
>
> Shared folders should work through the GUI without workarounds and
> fiddling, just as Windows and Mac do. It should not be necessary to
> get onto the forum, search, and mess with /etc/smb.conf. (It took over
> a week for me to discover the answer.)
>
> ProblemType: Bug
> DistroRelease: Ubuntu 10.04
> Package: samba 2:3.4.7~dfsg-1ubuntu3
> ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
> Uname: Linux 2.6.32-22-generic x86_64
> Architecture: amd64
> CheckboxSubmission: 5bf569339afeaacf6d8dcc180d0a06f0
> CheckboxSystem: b1865df84255b8716d3bcc269ff410d1
> Date: Fri Jun 11 11:33:18 2010
> Ecrypt...

Read more...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers