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

Re: smbmount and PAM



On Tue, 28 Mar 2000, EXT Buddy Smith wrote:

> My suggestion would be to add something to the .logout file so it gets unmounted.

That will work (tried it here..) quite nicely, the downside is that it
depends on user configuration.

> 
> I believe NIS+ and autoNFS can do a auto-mount home dir type thing. perhaps you should look at their
> implementation.

With NFS the problem doesn't exist, autofs handles it very nicely. Autofs
can do it for smb-mounts too, but only if you put your password in
/etc/auto_xxxx file. Not good :(

> 
> --buddy
> 
> On Tue, Mar 28, 2000 at 05:23:20PM -0500, Chip Christian wrote:
> > Won't work if I login, then cd elsewhere, do some stuff, then try to cd 
> > $HOME after the cleanup job has run...

Damn, didn't think of that. Otherwise a simple 'umount -a -t smbfs' in
cron would've done the trick of umounting unneeded smbfs-mounts.

	- Panu -

> > 
> > >  my $0.02 (CAD) :
> > > 
> > >  On the topic of detecting mounted filesystems not-in-use anymore :
> > > 
> > >  I think `fuser -m /the/smb/mount/point` tells you whether the mounted FS
> > > is still used or not. So there would have to be some sort of periodic
> > > cleanup process that umounts it.
> > > 
> > >       Jan
> > > 
> > > On Mon, 27 Mar 2000, Steve Langasek wrote:
> > > 
> > > > On Mon, 27 Mar 2000, Mihai Ibanescu wrote:
> > > > 
> > > > > 	Just my 0.02$: care should be taken to avoid mounting the same
> > > > > volume multiple times; also, to decide when a volume should be
> > > > > unmounted. Unfortunately, there is no way you can be sure a session is
> > > > > closed (logging out cleanly may do, but a crashed connection -- I don't
> > > > > know). Maybe you may consider using autofs for this (so that the mount to
> > > > > expire after some time). autofs would greatly simplify things, IMHO.
> > > > 
> > > > I don't see crashed connections being a problem: so long as the login process
> > > > exits normally (i.e., no 'kill -9'), each session will clean up after itself.
> > > > The point about unmounting shares that are still in use is well-taken,
> > > > however.  I think this can be dealt with in one of two ways, either by
> > > > creating a file for storing a reference count and only having the share
> > > > unmounted when the refcount reaches zero, and adding a job to the startup
> > > > scripts to clean up any Worst Case Scenarios; or by having the PAM module
> > > > ignore all errors from mount/umount, and just run a cron job periodically to
> > > > unmount any resources that are no longer in use (presuming, of course, that if
> > > > the mount point is still in use, the 'umount' will fail).
> > > > 
> > > > Steve Langasek
> > > > postmodern programmer
> > > > 
> > > > 
> > > 
> > > -- 
> > > -- Gospel of Jesus is the saving power of God for all who believe --
> > >                ## To some, nothing is impossible. ##
> > >                   http://Vicherek.Waterloo.on.ca/
> > > 
> > > -- 
> > > To unsubscribe: mail -s unsubscribe pam-list-request@redhat.com < /dev/null
> > > 
> > > 
> > 
> > 
> > -- 
> > To unsubscribe: mail -s unsubscribe pam-list-request@redhat.com < /dev/null
> 
> 

-- 
	- Panu -



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