Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a step-by-step tutorial that instructs in detailed step-by-step how to smbmount a Samba share to be used by a non-root user on a Ubuntu 10.04 desktop?

Note: there are numerous threads on Google search dealing with this seemingly new problem. Instructions that used to work on Ubuntu 8.04 (or an older version of smbfs) no longer work.

I need something fresh, punctual and especially reproducible.

Thanks.

share|improve this question
add comment

3 Answers 3

up vote 9 down vote accepted

A very nice tool to easily mount your samba shares in your home folder is SMBNetFSInstall smbnetfs. With this tool you can access your samba shares by nearly all applications simply through a mount point in your home.

How to use SMBnetFS:

  • Install the package through your package manager
  • cp /etc/smbnetfs.conf ~/.smb/smbnetfs.conf copy standard configuration
  • cp /etc/samba/smb.conf ~/.smb/smb.conf copy samba configuration
  • mkdir ~/sambashare or any other name for the mount point
  • smbnetfs ~/sambashare mount the shares to the mountpoint

Unfortunately there is only little documentation available. See man smbnetfs for options and go through the FAQ file in /usr/share/doc/smbnetfs.

share|improve this answer
    
+1 for the detailed steps. I hope this works with Eclipse, because with gvfs Eclipse definitely doesn't work. Do you happen to know how SMBnetFS is different from smbfs? –  Android Eve Feb 1 '11 at 23:14
1  
SMBNetFS uses fuse. Make sure users are in the fuse group. –  Takkat Feb 1 '11 at 23:23
    
+1 again! Doesn't gfvs use FUSE as well? How is it different from what I already have prepackaged (gvfs) with my GNOME desktop? –  Android Eve Feb 1 '11 at 23:38
add comment

When using gnome, you can simply type in the smb:// url into Nautilus. Normally gvfs-fuse and other gvfs packages should be installed, so that you can mount samba directly with the file browser. Additionally you should find all mounted stuff in your ~/.gvfs folder. This even works with other protocols and compressed files etc.

gvfs-mount smb://user@server/storage

I've tested it with eclipse and other tools and it works. gvfs-fuse must be installed.

share|improve this answer
    
Thanks but Eclipse won't work with this. I tried this already, that's why I was specifically asking about smbmount (a symbolic link to mount.cifs which is part of the smbfs package). –  Android Eve Feb 1 '11 at 23:09
2  
So eclipse can't access .gvfs in your home dir? As far as I know, every program should be able to do this. Correct me if I'm wrong. –  matthias.lukaszek Feb 2 '11 at 9:23
add comment

man mount will help you determine what options you want. If the windows system will always be available. You can just add the mount to the /etc/fstab and it will be mounted. You can allow the user to mount and unmount the partition as required using the options user,noauto. To allow others to unmount it change user to users.

Autofs also supports on demand mounts using samba. The incantation depends on which directories you want mounted when. I've run it successfully in a development environment.

EDIT: If you need to do this for a lot of users, I suggest using autofs to do the mounting. This does not require changes to fstab. Obtaining credentials for the various users may be a problem. I use a directory structure in the form /net/$HOST/$USER for my mounts. Autofs is configured for the /net/$HOST portion of the mount and automatically mounts the directories under it as needed.

Particular mounting approaches depend on your needs. I have had cases where users needed their Desktop directory mounted on the server, although typical mounts are server based.

For large organization with lots of user it may make sense to move the directories to a Linux server and use Samba to share the files to Windows users. I haven't tried the reverse, but it may be possible.

share|improve this answer
    
This works, but you need root access to change fstab. Even if are root, note that it is quite impractical if you have to do it for a lot of users, each with a specific share to mount (as in a large organization where each user has a personal share in a centralized file server). –  user46513 Feb 15 '12 at 13:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.