After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 157650 - nautilus should open a password dialog for smbfs mounts
nautilus should open a password dialog for smbfs mounts
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
2.10.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-08 12:17 UTC by Frederic Detienne
Modified: 2005-11-22 14:35 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Sample dialog. (17.01 KB, image/png)
2005-08-08 20:30 UTC, Stef Walter
  Details
Rough patch which prompts for password. (10.83 KB, patch)
2005-08-09 00:59 UTC, Stef Walter
needs-work Details | Review
Now without nasty deadlocking (12.44 KB, patch)
2005-08-09 04:05 UTC, Stef Walter
none Details | Review
Updated patch (19.89 KB, patch)
2005-08-11 03:45 UTC, Stef Walter
none Details | Review
Polished patch (16.83 KB, patch)
2005-08-30 01:39 UTC, Stef Walter
none Details | Review
Patch with Alex's suggested changes (25.78 KB, patch)
2005-11-15 20:26 UTC, Stef Walter
none Details | Review

Description Frederic Detienne 2004-11-08 12:17:36 UTC
Create an fstab entry to mount an SMB share. Do not put the password in fstab.

e.g.

//myserver/myshare       /mnt/smb-share        smbfs  
username=fdetienn/GROUP,noauto,users,rw  0 0

Ask nautilus to mount smb-share (from the Computer folder on the desktop)

Nautilus will try to mount the filesystem but will never prompt for a password.

When using the "mount" shell command, the password is asked for at mount time.
Comment 1 Sebastien Bacher 2005-05-14 11:32:53 UTC
thanks for the bug. That still happens with the current version.
Comment 2 Stef Walter 2005-08-08 15:22:34 UTC
This also applies to encrypted mounts. IMO, gnome-vfs should prompt for a
password for any of these. Will look into a solution.
Comment 3 Stef Walter 2005-08-08 20:30:48 UTC
Created attachment 50415 [details]
Sample dialog.

I've modified gnome-vfs so that when the 'mount' executable prints 'Password: '
on its TTY and then waits for input, a gnome-vfs-authentication dialog is put
up. 

Will upload a patch in a bit.
Comment 4 Stef Walter 2005-08-09 00:59:17 UTC
Created attachment 50425 [details] [review]
Rough patch which prompts for password.

Here's a rough patch which prompts for a password when the underlying 'mount'
process asks for a password. Needs some more love before it's ready.
Comment 5 Stef Walter 2005-08-09 04:05:59 UTC
Created attachment 50431 [details] [review]
Now without nasty deadlocking

TODO: 

- Check for openpty and relevant library properly in configure.in 
- Allow saving of password in gnome-keyring
- Fix problem with unmounting.
Comment 6 Stef Walter 2005-08-09 04:07:55 UTC
I get this strange error when trying to unmount the '/test' mount point through
nautilus:

   Error: mount point /test is not below /media/

This comes from the 'mount' command. Weird. From a terminal (user, non-root) the
unmount works fine with:

umount /test

Very strange. 
Comment 7 Stef Walter 2005-08-11 03:45:49 UTC
Created attachment 50551 [details] [review]
Updated patch

Fixes the umount issue, tries to do saving of passwords.
Comment 8 Stef Walter 2005-08-30 01:39:59 UTC
Created attachment 51535 [details] [review]
Polished patch
Comment 9 Alexander Larsson 2005-10-17 10:54:38 UTC
Some coments in: 
http://mail.gnome.org/archives/gnome-vfs-list/2005-October/msg00015.html
Comment 10 Stef Walter 2005-11-15 20:26:22 UTC
Created attachment 54799 [details] [review]
Patch with Alex's suggested changes

 - Removed save password support 
   (alex's concerns are valid and difficult to fix reliably).
 - Don't show loopback drives in 'Computer'
 - Use PTY code already present in gnome-vfs (was used for sftp-method).
Comment 11 Alexander Larsson 2005-11-22 14:35:10 UTC
commited.