share samba doesn't work easily

Bug #995817 reported by J-Paul BERARD
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nautilus-share (Ubuntu)
Invalid
Undecided
Unassigned
samba (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Share a folder in a simple domestic network need to check the share item in the folder properties.
Ubuntu ask to install samba and libpam-smbpass. After reboot and check this item again, Ubuntu ask to change the permissions.
After this point, it should work ! It would be quite easy.

It doesn't !

2 more things were necessary :
I had to add system-config-samba and add again the share folders.
From the other computer (with Ubuntu) I must connect with the IP adress to see these share folders !

Is it normal ? Thanks !

Server : 12.04 updated from 11.10 ; client 12.04 fresh install

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: samba 2:3.6.3-2ubuntu2.1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Mon May 7 09:54:41 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: samba
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
J-Paul BERARD (arverne) wrote :
J-Paul BERARD (arverne)
description: updated
Revision history for this message
James Page (james-page) wrote :

Thanks for taking the time to report this bug in Ubuntu.

I might be missing the point but I could not reproduce this:

"Share a folder in a simple domestic network need to check the share item in the folder properties.
Ubuntu ask to install samba and libpam-smbpass. After reboot and check this item again, Ubuntu ask to change the permissions.
After this point, it should work ! It would be quite easy."

I could not find any options in the standard file manager on my 12.04 install todo this - could you explain in a bit more detail?

With regards to;

"2 more things were necessary :
I had to add system-config-samba and add again the share folders."

I was able to configure shares using system-config-samba - that worked fine (and I think is probably the correct way todo it).

With regards to:

"From the other computer (with Ubuntu) I must connect with the IP adress to see these share folders !"

I suspect that something is incorrect in your local network or samba configuration; its worth checking to see if you can resolve the hostname of the system you are trying to connect to from the client:

   hostname <samba target>

Marking 'Incomplete' pending your response. Please set the status back to 'New' once you have provided the requested information about how you tried to configure samba sharing first.

Thanks

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
J-Paul BERARD (arverne) wrote :

Thanks for the answer.

Samba server is not included in a usual install of Ubuntu.
In Nautilus :
1st time you check "share this folder" ('partager ce dossier' in french in the screen copy included) in the folder properties of the folder you want to share on your network (right click on the folder), Ubuntu ask to install samba server...
Next, you will have to reboot, go back to this folder properties window ; you are now able to check "share this folder". At this time, Ubuntu tell you that it must change the permissions of this folder to allow other computer to read or write in this folder. You can see that in the 2nd tab of the same window (screen copy added).

My network had different computers mainly connected wireless. A "box" is connected to Internet and play the DHCP server.
I don't understand well the hostname command... On the server workstation hostname give the right name.
On the client workstation, I used "host 'nameofthe server'" and I get the right IP adress of the server

Revision history for this message
J-Paul BERARD (arverne) wrote :
Revision history for this message
J-Paul BERARD (arverne) wrote :

End of my answer :
About :

"I was able to configure shares using system-config-samba - that worked fine (and I think is probably the correct way todo it)."

It's not what is described in the french documentation of the new releases of Ubuntu http://doc.ubuntu-fr.org/samba and it's surprising ! Ubuntu wants to be easy. It ask you different things to share a folder and you should do things that it doesn't ask...
And system-config-samba looks to write in smb.conf file while ckecking the share tab of the folder properties write in var/lib/samba/usershares. It looks like 2 different ways ?
Thanks

Changed in samba (Ubuntu):
status: Incomplete → New
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi J-Paul,

I'm pretty sure you are right and system-config-samba should not be needed. You were trying to share files through nautilus which should do it itself. If I'm wrong about that and it cannot, then it should be automatically installing it. In either case, I'll re-target this bug at nautilus.

affects: samba (Ubuntu) → nautilus (Ubuntu)
affects: nautilus (Ubuntu) → nautilus-share (Ubuntu)
Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 995817] [NEW] share samba doesn't work easily

On 01/06/2012 20:51, Launchpad Bug Tracker wrote:
> You have been subscribed to a public bug:
>
> Share a folder in a simple domestic network need to check the share item in the folder properties.
> Ubuntu ask to install samba and libpam-smbpass. After reboot and check this item again, Ubuntu ask to change the permissions.
> After this point, it should work ! It would be quite easy.
>
> It doesn't !
>
> 2 more things were necessary :
> I had to add system-config-samba and add again the share folders.

No, actually system-config-samba directly writes share information to
/etc/samba/smb.conf, whereas nautilus-share adds them via "net usershare" which
lands in /var/lib/samba/usershares/. If you've added the shares in both
system-config-samba and nautilus-share, then you've defined them twice, and I'm
not sure how Samba reacts to that.

Could you post the terminal output of "net usershare info", please?

  status incomplete

>>From the other computer (with Ubuntu) I must connect with the IP adress to see these share folders !
>
> Is it normal ? Thanks !

As for needing to connect with the IP address.. well I think it's normal. It's
fairly normal for even Windows to fail to find other Windows machines on the
network, and SMB is a Windows-originated protocol. You could try using
smb://machinename.local/ instead, though. That resolves IP addresses using a
different stack (Avahi/zeroconf), and works much more reliably than the typical
WINS method.

--
Kind regards,
Loong Jin

Changed in nautilus-share (Ubuntu):
status: New → Incomplete
Revision history for this message
J-Paul BERARD (arverne) wrote :

Thanks for your answers.

If I used system-config-samba after nautilus-share, it's only because I was unable to see my shared folder from another computer with the first one. Of course, I agree that's not normal and that the right way in Ubuntu would be nautilus-share only.
The output you ask me :

jpaul@jpblinux:~$ net usershare info
[musique]
path=/home/jpaul/Musique
comment=
usershare_acl=Everyone:F,
guest_ok=n

[Public]
path=/home/jpaul/Public
comment=
usershare_acl=Everyone:F,
guest_ok=y

[Documents]
path=/home/jpaul/Documents
comment=
usershare_acl=Everyone:F,
guest_ok=n

[bureau]
path=/home/jpaul/Bureau
comment=
usershare_acl=Everyone:F,
guest_ok=n

info_fn: file /var/lib/samba/usershares/portable is not a well formed usershare file.
info_fn: Error was Path is not a directory.
[images]
path=/home/jpaul/Images
comment=
usershare_acl=Everyone:F,
guest_ok=n

About needing for IP address, I think nevertheless that it can be improved. It's easier for Ubuntu to connect to a Mac or Windows.
Kind regards.
--
J-Paul

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 995817] Re: share samba doesn't work easily

On 06/06/2012 02:10, J-Paul BERARD wrote:
> Thanks for your answers.
>
> If I used system-config-samba after nautilus-share, it's only because I was
> unable to see my shared folder from another computer with the first one. Of
> course, I agree that's not normal and that the right way in Ubuntu would be
> nautilus-share only.
> The output you ask me :
>
> jpaul@jpblinux:~$ net usershare info
> [musique]
> path=/home/jpaul/Musique
> comment=
> usershare_acl=Everyone:F,
> guest_ok=n
>
> [Public]
> path=/home/jpaul/Public
> comment=
> usershare_acl=Everyone:F,
> guest_ok=y
>
> [Documents]
> path=/home/jpaul/Documents
> comment=
> usershare_acl=Everyone:F,
> guest_ok=n
>
> [bureau]
> path=/home/jpaul/Bureau
> comment=
> usershare_acl=Everyone:F,
> guest_ok=n
>
> info_fn: file /var/lib/samba/usershares/portable is not a well formed usershare file.
> info_fn: Error was Path is not a directory.
> [images]
> path=/home/jpaul/Images
> comment=
> usershare_acl=Everyone:F,
> guest_ok=n

It looks like something put a folder in /var/lib/samba/usershares/portable. That
shouldn't be there. Please remove it. After that, could you also try removing
the share entries from system-config-samba, and seeing if the shares are
accessible from another machine, or even smb://localhost/?

If they are not, please provide the output of "net usershare info" again, as
well as "testparm -s"

> About needing for IP address, I think nevertheless that it can be improved. It's easier for Ubuntu to connect to a Mac or Windows.
> Kind regards.

Okay, could you file a separate bug against the "samba" package regarding the IP
address issue? nautilus-share only touches the usershare information via "net
usershare (add|remove|info)".

--
Kind regards,
Loong Jin

Revision history for this message
J-Paul BERARD (arverne) wrote :

"Portable" was a shared folder I created at a moment and has been deleted. I have removed it from /var/lib/samba/usershares/
I removed all the share entries in "Samba" (system-config-samba) except 'print$' (I don't remember to have entered it)

1 - The shared folders are no more visible from another Ubuntu computer of the network (we see only 'printer$') ; same thing by smb://localhost/ on my computer
2 - I checked : in Nautilus, they still look like "shared"
3 - Here are the result of the 2 outputs :

jpaul@jpblinux:~$ net usershare info
[musique]
path=/home/jpaul/Musique
comment=
usershare_acl=Everyone:F,
guest_ok=n

[Public]
path=/home/jpaul/Public
comment=
usershare_acl=Everyone:F,
guest_ok=y

[Documents]
path=/home/jpaul/Documents
comment=
usershare_acl=Everyone:F,
guest_ok=n

[bureau]
path=/home/jpaul/Bureau
comment=
usershare_acl=Everyone:F,
guest_ok=n

[images]
path=/home/jpaul/Images
comment=
usershare_acl=Everyone:F,
guest_ok=n

The second one :
jpaul@jpblinux:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
 workgroup = MAISON
 server string = %h server (Samba, Ubuntu)
 map to guest = Bad User
 obey pam restrictions = Yes
 pam password change = Yes
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
 username map = /etc/samba/smbusers
 unix password sync = Yes
 syslog = 0
 log file = /var/log/samba/log.%m
 max log size = 1000
 dns proxy = No
 usershare allow guests = Yes
 panic action = /usr/share/samba/panic-action %d
 idmap config * : backend = tdb

[printers]
 comment = All Printers
 path = /var/spool/samba
 create mask = 0700
 printable = Yes
 print ok = Yes
 browseable = No

[print$]
 comment = Printer Drivers
 path = /var/lib/samba/printers

About IP address : perhaps something has improved... Now, we can see immediatly this computer with his shared folders (when they are visible !) from the other one in Nautilus without using the IP address. So stand by for this second issue.
Thanks.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

At this point, it looks like there's something wrong in Samba that causes the usershares to not be exported, so I'm reassigning this bug to that package instead.

affects: nautilus-share (Ubuntu) → samba (Ubuntu)
Changed in samba (Ubuntu):
status: Incomplete → New
Revision history for this message
Robie Basak (racb) wrote :

Failed to reproduce on samba 2:3.6.3-2ubuntu2.2.

I used "net usershare add test /home/ubuntu/test '' '' guest_ok=yes", ran "smbclient -L localhost", and the new share had appeared there. "smbclient //localhost/test" allows me to connect to it.

I then installed libpam-smbpass and set a password for the ubuntu user using "sudo passwd ubuntu". Then I ran "net usershare add test /home/ubuntu/test2" and "smbclient //localhost/test2" allows me to connect to it if I used the password I set.

It seems to me that samba's usershares are working exactly as expected, so I'm marking this as Invalid in samba. If this is not the case, please could you explain exactly what samba should be doing that it is not?

I'm also adding a separate bug task for nautilus-share. It sounds like it's an issue between one of these two packages.

Changed in samba (Ubuntu):
status: New → Invalid
Revision history for this message
Robie Basak (racb) wrote :

J-Paul,

Perhaps it would help if you installed the smbclient package and then run:
    smbclient -L localhost

and for each share listed (if any), run:
    smbclient //localhost/<share>
both with your password and with no password.

This would help isolate if this is a problem in Nautilus or in Samba.

Thanks!

Revision history for this message
Chow Loong Jin (hyperair) wrote :

I'm pretty sure it's not a nautilus-share issue. Nautilus-share only deals with the output of "net usershare info" and manages user shares via the "net usershare add" and "net usershare delete" commands. If "net usershare info" says that the share exists, then as far as nautilus-share is concerned, the share exists. If Samba is still not exporting the share despite saying that the usershare exists, then there is a bug in Samba.

I am setting the status for Samba to incomplete until the requested information (output of smbclient -L //localhost/ and smbclient //localhost/<share>) is provided.

Changed in samba (Ubuntu):
status: Invalid → New
status: New → Incomplete
Changed in nautilus-share (Ubuntu):
status: New → Invalid
Revision history for this message
J-Paul BERARD (arverne) wrote :

Robie,

I agree with you : on your computer, it works as I would expect.

My computer was built new this year and I installed 11.10. I upgraded to 12.04 beta version in march I think. I don't think to have installed very exotic app : only VirtualBox, and Digikam (which is more designed for KDE).

Under, the 2 commands you asked me. I tried the 2nd one for 2 shared folders in Nautilus : Public and Documents. The 2nd time, for Documents, I didn't enter the password.

Your chat with Chow is interesting for me despite I have no idea I've no idea where the process fails.
Thanks for your help.

jpaul@jpblinux:~$ smbclient -L localhost
Enter jpaul's password:
Domain=[MAISON] OS=[Unix] Server=[Samba 3.6.3]

 Sharename Type Comment
 --------- ---- -------
 print$ Disk Printer Drivers
 IPC$ IPC IPC Service (jpblinux server (Samba, Ubuntu))
Domain=[MAISON] OS=[Unix] Server=[Samba 3.6.3]

 Server Comment
 --------- -------
 JPBLINUX jpblinux server (Samba, Ubuntu)

 Workgroup Master
 --------- -------
 MAISON JPBLINUX
jpaul@jpblinux:~$ smbclient //localhost/Public
Enter jpaul's password:
Domain=[MAISON] OS=[Unix] Server=[Samba 3.6.3]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
jpaul@jpblinux:~$ smbclient //localhost/Documents
Enter jpaul's password:
Domain=[MAISON] OS=[Unix] Server=[Samba 3.6.3]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
jpaul@jpblinux:~$ smbclient //localhost/Documents
Enter jpaul's password:
Domain=[MAISON] OS=[Unix] Server=[Samba 3.6.3]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for samba (Ubuntu) because there has been no activity for 60 days.]

Changed in samba (Ubuntu):
status: Incomplete → Expired
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.