Entire home dir is shared within another in samba!

Bug #27608 reported by Giorgos
10
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Medium
Adam Conrad

Bug Description

Create a samba share, then create a password that is the same as your user
password in ubuntu. Go to another computer and access all the shared
directories. Chances are in one of them there will be the entire contents of
your home dir! Within the other directory, yes.

This is one of the craziest bugs ever and it needs to be fixed asap.

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

I confirm that bug in dapper up to date.
I'll investigate.

Changed in samba:
status: Unconfirmed → Confirmed
Revision history for this message
Adam Conrad (adconrad) wrote :

This isn't really a bug, but established behaviour. Homes have always been shared by default, though I'm open to suggestions about how we should perhaps lock them down (by, say, using "valid users = %U" or something on the homes shares by default)

Revision history for this message
Giorgos (pinkisntwell) wrote :

I don't think it is expected behaviour. The contents of the home directory are *inside* some other shared directory, as if the user mounted them there!

Revision history for this message
Adam Conrad (adconrad) wrote :

Okay, I might need screenshots or diagrams for you to properly explain this bug to me, then, because I certainly can not reproduce "Samba is exporting random directories inside others" over here.

Revision history for this message
Giorgos (pinkisntwell) wrote :

What screenshots do you need? A screenshot from nautilus showing my files? The bug is confirmed by another user, look above.

And it's not "random directories", it's the home directory.

Revision history for this message
Adam Conrad (adconrad) wrote :

Alright, to summarise:

1) You report a bug about home directories being shared by default (or, so I assume)
2) After I make the above assumption, you tell me that "no, no, the home directory contents are *inside* some other shared directory"
3) I say "I have no idea what that means, then, since the only place your home directory should be exported is in the default home directory shares" (ie: //hostname/username )

So, if you're seeing something OTHER than your home directory exported as //hostname/username (which is how I'm reading your responses), then yes, I'd like to know what that looks like.

Revision history for this message
Giorgos (pinkisntwell) wrote :

Okay, once again.

I select some directories to be shared on the network. I do not select my home dir to be shared.

I go to the other computer, access the shared directories and in one of them I find the home dir mounted.

One user above confirmed it. It has happened to me several times. I don't know what would you need the screenshot for, do you want me to do a ls on some shared directory and show you the output? I don't think it's useful.

Revision history for this message
Adam Conrad (adconrad) wrote :

Your home directory isn't *mounted* on the other system, unless you asked for it to be, but you are correct that (as I stated above) home directories are *shared* by default (which means you can see them in browse lists, you can connect to them, etc).

Revision history for this message
Giorgos (pinkisntwell) wrote :

It is mounted, that's the bug. I know it's not expected, that's why I submit it as a bug.

Revision history for this message
Adam Conrad (adconrad) wrote :

Okay, and now we're back to the confusion. Where is it mounted? Does it show up in the output of "mount"? Or, do you mean that it's visible in Places->NetworkServers?

Nothing is mounted by client systems by default, unless you have some auto-discovery daemon running that mounts anything on the network that you can access (Windows does this, and it's irritating), and it's certainly not a bug in the server if your client decides to do this.

So, yes, we're back to the "I'd like more specific information" bit here. Where, *precisely* are you seeing your home directory "mounted". "In some shared directory" isn't very helpful.

Changed in samba:
status: Confirmed → Needs Info
Revision history for this message
Giorgos (pinkisntwell) wrote :

I didn't check if it's included in the output of mount. I'll have to check.

It is mounted inside another directory. "In some shared directory" isn't very helpful but this is what happens. It si mounted inside another directory. One of the shared directories, I don't know how it selects it.

I will try to reproduce it again, as it has been a while since I first submitted the bug and get back to you.

Revision history for this message
Giorgos (pinkisntwell) wrote :

I just tried to reproduce the bug and something a little different happened.

I selected three directories to be shared. All of them were inside my home directory, but I didn't select the home directory itself.

I then logged in as another user into the network and saw that of the three dirs I had selected two were accessible on the network and one was replaced by my home directory, in plain view.

http://img114.imageshack.us/img114/6007/screenshot8ki.png

About the mount thing, no, mount does not report any peculiar mounts.

Revision history for this message
Adam Conrad (adconrad) wrote :

So, you shared one of those directories as //server/giorgos, which, thanks to the default smb.conf with the [homes] directive in it, is already an export of your home directory (and can't be two things at once).

Is that more or less what I'm seeing here?

If not, please attach a copy of your smb.conf to go with this screenshot so I do know what I'm seeing. :)

Revision history for this message
Adam Conrad (adconrad) wrote :

As of 3.0.22-1ubuntu3, the default config file now has the [homes] share commented out, which should avoid confusion like this.

Changed in samba:
status: Needs Info → Fix Released
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.