gabriel rosenkoetter on Sat, 1 Mar 2003 12:54:04 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Samba - user mounting a drive


On Sat, Mar 01, 2003 at 07:59:15AM -0500, Paul wrote:
> What about just putting a smbmount command in one of the login scripts?

Hopefully you mean to X not to the shell. You don't want users
executing smbmount with every new shell.

If we were talking regular X here, you'd want that in
/usr/X11R6/lib/X11/xdm/{Give,Take}Console (the latter for unmounting).
I haven't a clue where KDE and Gnome will keep this stuff.

On Sat, Mar 01, 2003 at 08:45:07AM -0500, eric@lucii.org wrote:
> That was my first thought but that means that each user has to have a
> separate script on _each_ computer.

No it doesn't. You've got $LOGNAME and $HOME at X login time.

> Also, there is no corresponding
> "logout" script so when the user logs out from KDE or Gnome there is no
> way to unmount the share.  

Huh? It wouldn't be possible for KDE and Gnome to lack an equivalent
to TakeConsole. You have to chown the devices back to root or the
next user to login is screwed. The original purpose for these files
is to let the console user actually have access to the console
devices.

> Ideally there should be a user "startup" and "shutdown" file for KDE or
> Gnome so that things like this can be set up.  Anybody know of any?  I
> tried Google/Linux and found nothing relevant.

As I said, I know for regular X11R6.

> I like the idea of using automount so I'll be experimenting with that.
> If we can automount the user's home directory and the shares then so
> much the better!

Automounting's the right way to do this because it doesn't rely on
the GUI. Any user who logs in in any way should get this, it
shouldn't be relying on your GUI logins.

On Sat, Mar 01, 2003 at 10:37:53AM -0500, Paul wrote:
> Looking at my list of services in RedHat 8.0, it looks like "netfs" will 
> automount NFS, SMB, and NCP exported filesystems or shares.

How does that relate? That's just the startup script that processes
through /etc/fstab for system mounts that require networking.

automountd is configured through /etc/auto_master and friends. See
automountd(8).

> Does the automounter unmount automatically?

It unmounts automatically after a timeout. Yes, even if the user's
still logged in (though obviously it can't if a directory under the
mount is in use). That's okay, because it remounts again on any use.

> Not that the automounter is a bad idea.  I'm just trying to think of a 
> way to do it in the simplest way with least number of utilities,  And 
> I've been thinking of this type of solution.

automountd is the Right answer.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpneQfNdvcbG.pgp
Description: PGP signature