[shares-admin] Shared folders requires a login

Bug #14774 reported by Glen Stampoultzis
106
Affects Status Importance Assigned to Milestone
GST
Fix Released
Medium
gnome-system-tools (Ubuntu)
Fix Released
High
Unassigned
Declined for Gutsy by Sebastien Bacher

Bug Description

I tried to share a folder a folder under my home directory then connect to it
from a windows machine. The user did not authenticate. After some searching I
found a suggestion to run the command smbpasswd. I did this. I could now
connect from the windows machine however it showed two shares. My home
directory and the actual folder I had asked to be shared. In the shared folders
list it still only showed the one directory.

My issues with this is that:

1. You should never have to bother with running smbpasswd in the first place.
2. The home folder should not have been shared without my asking for it to be
shared.
3. All shared folders should show up in the list.

http://bugzilla.gnome.org/show_bug.cgi?id=319390: http://bugzilla.gnome.org/show_bug.cgi?id=319390

Revision history for this message
Frank Niedermann (fbn) wrote :

I have the same issues (Breezy RC1).

I think access to the shares should be possible without authentication
(anonymous) as long as there is no way to set up user based permissions.

Also if I try to share my home directory with shares-admin the /root directory
gets shared (I think this is because of sudo). Instead of that the home
directory of the user should be used.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. I've forwarded it upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=319390

Revision history for this message
Eric Stokes (eric-stokes) wrote :

(In reply to comment #1)
> I have the same issues (Breezy RC1).
>
> I think access to the shares should be possible without authentication
> (anonymous) as long as there is no way to set up user based permissions.

I do agree with this, however I don't think the right solution is to
automatically allow anonymous to view any share.

Revision history for this message
Alexander Kirillov (shurik179) wrote :

This bug is still there in Dapper Flight 6. Any chances of this being fixed for Dapper final release?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Patrice, you looked on those samba issues, is that the frequent "default samba configuration should be change" argument?

Revision history for this message
Robin Haswell (rob-digital-crocus) wrote :

I just posted this on Ubuntu Forums:

Hey guys

I dunno if you've heard this a million times before or not, but I'm just putting it out there because I can find very little about this on the forums:

For Dapper to be the quality release that everyone wants it to be, and for it to compete as a Windows migration platform, folder sharing with Windows is important. Here are my views:

1. Share management works a treat. No complaint about this

However

2. That's not even half the battle. In every Ubuntu version I've used (Hoary -> Dapper), Shared Folders has never worked because people are required to login, and there is no UI (and very few hints) on adding users. I'm told you need to add a unix account then set an smbpasswd (sudo smbpasswd -a user) for it. Apparently this works, but it's difficult to discover (IE. you have to find a thread on the forums then *shock* open a terminal).

I think there should be a UI for performing this operation. However, this isn't really necessary. I am absolutely certain though that the Shared Folders UI should inform users why shared folders doesn't work immediately, and what do do about it. This will allow 99% of people to successfully share folders with other people.

One other problem is sharing mounted NTFS drives doesn't work. I'm working through this at the moment, but I don't think it's terribly important to fix this bug.

Revision history for this message
Justin J Stark (justinjstark) wrote :

I went to share a single folder inside of my home directory only to find that I could access my entire home directory. As stated, this should not be the default behavior.

As far as authentication, maybe it would be best to allow anonymous access to shared folders (with readonly) permission by default.

And, a gui to take care of smbpasswd is needed. It took me a while to figure out that I needed to set up a samba user in order to access my shares. This should all be handled by a gui inside of "Shared folder settings."

Revision history for this message
Alexander Kirillov (shurik179) wrote :

given the number of duplicate reports, I think changing the status to Confirmed is justified

Changed in gnome-system-tools:
status: Unconfirmed → Confirmed
Revision history for this message
karlrhs (karlrhs) wrote :

Shared folder does only default to the home directory. I attempted to make a sub directory but this did not work. It keeps wanting to share the whole home dir. Ubuntu must fix this. I have an suse dvd on stand by. There is no reason why this should not have made the Dapper in time.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

@karlrhs:

Perhaps it hasn't been fixed yet, since developers are disatracted by answering inappropriate bug comments. Please show more respect for the work of the developers.

Revision history for this message
Alexandre Otto Strube (surak) wrote :

Glatzor, this bug went upstream almost nine months ago, and it's unconfirmed yet.

Besides, it is around since warty, so it seems fair that people ask for it, unfortunately.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

I refered to the wording of karlrhs last comment and not the bug itself.

Revision history for this message
Alexandre Otto Strube (surak) wrote : patch for share backend

Seb128, edgy will have liboobs, but how this is going to be managed in dapper?

The patch provided is for adding a gst_change_smbpasswd function in the backend. share-admin would need to call it in its general windows sharing preferences, or in a per-user basis.

As I looked to the code just now, I didn't figured it out yet how to make the g-s-t frontend communicate with it. I'm intended to take a look at it soon.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Alexandre for your work on that. Dapper is stable and will not change, the patches probably need to be different for dapper and edgy then.

Using adduser will force users to use a password anyway, no? Maybe samba should be changed to not require a password by default instead, there is some samba bugs open about that

Revision history for this message
fafek2 (fafek2) wrote :

I'm sorry but I can only say that this applet is useless at the moment.
If someone find out that he need to use smbpasswd utility, there is very short way to learn basics of Samba.
Later, user will be able to edit smb.conf manually with no one's help in order to add own shares with more advanced options than shares-admin provide, even if he is total noob. He won't give a damn, then.

Revision history for this message
jdriessen (j-driessen) wrote :

Hi. I wanted to share files with my brother's computer (I am running ubuntu 7.04) but I couldn't get it to work.

I wish there was a setup assistant (or something) when you want to share a file/folder so that it just works.
It took me a whole lot of time scouring the forums to find out that I needed to set up a samba password/login in terminal.
Why can't samba use the same login/password as when I log into my computer? ...I had to set it up in terminal.

J.

Revision history for this message
Bump (bump55) wrote :

I still am having this problem in feisty fawn 7.04. There should be an option like "share anonymously to users from the same workgroup" to do the job.

Revision history for this message
Rob Caskey (rcaskey) wrote :

https://wiki.ubuntu.com/SimpleSambaIntegrationSpec attempts to address the difficulty you encountered. If any qualified person can help fill out this spec, please do, so that it might have a shot for feisty+1.

Revision history for this message
Eduardo Durany Fernández (edurany) wrote :

What about change:
  "; security = user"
to
   "security = share"
in /etc/samba/smb.conf? (remove the ";" to uncomment the option)

And make this the default option?

Revision history for this message
Bump (bump55) wrote :

Just changing the security type has no effect. The workaround is far more complex than that.

Revision history for this message
TomasHnyk (sup) wrote :

Oh yeah, that would have an affect. Sharing would start to work out of the box, only it would be rather unsecure (onyone on the LAN (and possibly even the internet) could access your shares). I do not think this should be default but it should be easily accessible alongside the possibility to setup samba accounts and passwords However, that would probably need someone to implement it...

Revision history for this message
Bump (bump55) wrote :

Well, actually I tried it with a default installation but has no effect. Maybe I am missing something, but if I miss it in a default installation users with a default installation do aswell. There maybe the option to show shares only to users of the same workgroup, for example limiting access by IP like windows does I think.

Changed in gnome-system-tools:
assignee: seb128 → desktop-bugs
importance: Medium → High
status: Confirmed → Triaged
Revision history for this message
Martin Olsson (mnemo) wrote :

I also ran into a bunch of these problems today with the released gutsy version. Here is what I found:

Using "System::Administration::Shared Folders" I can easily share a folder but if I try to access it from a remote machine no combination of username/password will work. To fix that I had to run the following commands in a terminal:

1. sudo -i
2. smbpasswd my_ubuntu_username
3. (then I enter a brand new password for SMB use only)

At all time, I kept the default security settings in smb.conf (that is I used security=user). I think that the SAMBA team generally advises against using security=share (I read this in some RHEL documentation page). The security=share security model is what Windows 95 and 98 used. Finally, as a side note; I'm pretty sure that the NTFS sharing issue outlined by Robin Haswell above has been fixed in Gutsy. I shared a NTFS mounted drive with no problems at all.

I'd love to see some kind of way to create a share without dropping into the command line. Go Ubuntu!

Revision history for this message
Vincent Tschanz (fogia) wrote :

Using Gutsy now, we always need to use smbpasswd manually to get a working folder sharing...

Changed in gst:
status: New → Fix Released
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Fixed upstream, thanks.

Changed in gnome-system-tools:
status: Triaged → Fix Committed
Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

Fixed in 2.21.3-0ubuntu1

Changed in gnome-system-tools:
status: Fix Committed → Fix Released
Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

This bug is always here on Hardy Beta

Changed in gnome-system-tools:
milestone: none → ubuntu-8.04
status: Fix Released → Confirmed
Revision history for this message
BrandonTomlinson (druke) wrote :

I've found that changing the permissions of the folder in nautilus (thus an interface for chmod), so that the 'others' have the desired permission, makes everything work like a charm.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Patrice, may you tell us a few steps in order to reproduce the problem? also you may want to subscribe to http://bugzilla.gnome.org/show_bug.cgi?id=319390 ; thanks in advance. BTW this is working fine for me.

Changed in gnome-system-tools:
status: Confirmed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this issue and help to improve Ubuntu.

I believe this bug has been resolved for hardy, with the removal of shares-admin from gnome-system-tools. The nautilus-share package which replaces it supports both anonymous and authenticated shares.

The issue with home directories being shared by default was separately resolved by way of the samba package in dapper.

Finally, the issue of needing to call smbpasswd separately in order to access password-protected shares is now being tracked as a bug in the pam package: bug #201291.

Changed in gnome-system-tools:
assignee: desktop-bugs → nobody
status: Incomplete → Fix Released
Revision history for this message
James (chiisu81) wrote :

Something I discovered from trying to setup sharing in both Ubuntu and Fedora:

An easy way to setup sharing is to install the system-config-samba application, which I think should be installed by default along with Samba. With that utility I was able to setup users for Samba sharing as well as easily defining my shares. I did have to log-in as root to change the permissions on the share (in my case /data), so that everyone had read/write access, but that's because I'm not proficient w/ using chmod as a sudo command. After that, I was able to map the network drive from a Windows laptop and successfully access the shared folder. My MacBook on the other hand, still cannot access it...

Changed in gst:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.