I have an Open Suse 11 box that I am running as a multiple user server. All users will access this box via ssh. All users are logging in using the Microsoft Active Directory domain userid and password with no problem. I also have a MS Windows Server running as a fileserver and want each of the individual users to be able to mount their shared directory at login and unmount it at logout.
I understand that mount is not available to non root users for security reasons, but if a non root user logs in on the console, they can easily access their shared space using by using “Connect to server” in Nautilus.
The thing that I don’t understand is why users cannot do this via the command line, but can via Nautilus. It seems that eventually Nautilus is running some command that should be available from the command line so that the shared space can be mounted without root access.
Any insight would be appreciated. I feel like I might be missing something very simple here as this seems like a common thing to need to do in a multi-user environment.
that was not exacly the question thestig… Although a good read
Steve,
Haven’t looked at this but I suspect Nautilus has permissions to execute a mount though GNOME’s gvfs.
Another difference is that the mount point is made in the home folders, so no extra rights are needed on the mount point itself.
>
> that was not exacly the question thestig… Although a good read
>
> Steve,
> Haven’t looked at this but I suspect Nautilus has permissions to
> execute a mount though GNOME’s gvfs.
> Another difference is that the mount point is made in the home folders,
> so no extra rights are needed on the mount point itself.
>
> Curious now too,
> Wj
>
>
Likely using the FUSE user filesystem. Using FUSEfs, you can mount drives in
your own subdirectories without asking root for help.
-switch-topic-
If you want a user to be able to mount/umount something listed in /etc/fstab,
place the ‘user’ or ‘users’ option at the end of the options declaration
(4th ‘column’) on the line in fstab describing the mount.
‘user’ - only the user who mounted a filesystem can unmount it
‘users’ - anyone can unmount it
Yeah, I had read the docs mentioned above already.
Looks like FUSEfs will work. I certainly do only want the user to mount their shared space in their home directory when they login and then unmount it when loging out. They would be mounting something like //vault/home/username to a subdirectory of their home.
I hoped to be able to script this in the login/logout scripts for the entire system.
>
> Yeah, I had read the docs mentioned above already.
>
> Looks like FUSEfs will work. I certainly do only want the user to
> mount their shared space in their home directory when they login and
> then unmount it when loging out. They would be mounting something like
> //vault/home/username to a subdirectory of their home.
>
> I hoped to be able to script this in the login/logout scripts for the
> entire system.
>
> Sound doable?
>
> Thanks,
>
> Steve
>
>
Definitely doable!
{Sigh} NOW I’ve got to read up on the fusefs stuff… oh joy!
if you were to put some commands into a user’s .xinitrc, you could have a
user’s shared folder automounted into their home directory… something like
this:
(forgive the pigeon code, rusty on fusefs, but have concept in my head)
make sure mount point exists
if ! -d ~/shared ]; then
mkdir ~/shared
fi
fusemount smb://username:password@host/folder ~/shared
Of course, now I can’t remember how to get something to occur when a user logs
out…
the man page for xinit is informative, it says that when the xinitrc script
exits, the user has logged out. The script does some setup, runs the window
manager (kde/gnome/tvm/etc), and then exits. The window manager doesn’t
return until the user logs out… so:
Thank you! That helps quite a bit. I forget about the pam subsystem that
exists, and that can do all sorts of amazing things, but I haven’t read
enough about yet…
The phrase
The more I learn, the more I learn, there’s more to learn.
Thanks guys, this is all really helpful. The only problem is that I can’t find fusemount. I’ve installed all the fuse packages that I can find and do not have it.
Would you care to explain how to use pam to do this too?
OK, now I see that there is a pam_cifs which is supposed to be simpler to use than pam_mount. I just can’t find any docs on how to configure pam_cifs. Any ideas?
The page from Kroon is a bit outdated, as the pam_mount configuration file moved to XML. It’s now <volume fstype=“cifs” server=“name” path=“homes” mountpoint="~" />