Re: when is a user really logged out (pmvarrun)

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

 



Am Montag, 20. November 2006 16:38 schrieb Jon Miller:
> I tend to think you're best solution would be one that didn't require that
> external program to be running and maintaining login status. Doing some
> quick research, I believe using utmp should be able to give you an accurate
> count of who's logged in and therefore be able to give you a count of the
> remaining sessions for your particular user. Take a look at utmp(5).

Looking at utmp isn't enough. think of cronjobs / at-jobs or user leaving 
active processes behind them. I think, these processes should find the 
filesystem, too.

That was one of the reasons why I created the pam-cifs as an alternative to 
pam-mount. pam-cifs looks for active user processes. If there are any, 
umounting is postponed.

>
> -- Jon Miller
>
> On 11/20/06, Fabian Stäber <fabian@xxxxxxxx> wrote:
> > Hi,
> >
> > I'm writing a small PAM module that can mount my truecrypt-encrypted home
> > directory using my login password. This should become a small module with
> > just a few lines of code.
> > Mounting the directory works fine, using pam_sm_authenticate().
> >
> > Now I'm wondering when to unmount the home directory. The problem is that
> > the user might be logged in multiple times, so when the user
> > logs out, the module must check if there is still another open session.
> >
> > I had a look at pam_mount, and it seems to use an external program
> > pmvarrun to keep track of the login count in /var/run/pam_mount.
> >
> > Is there an easier way to determine the last logout?
> > May be calling who, or something like this?
> >
> > I would appreciate any ideas.
> >
> > Fabian.
> >
> >
> > _______________________________________________
> > Pam-list mailing list
> > Pam-list@xxxxxxxxxx
> > https://www.redhat.com/mailman/listinfo/pam-list

-- 
Wilhelm Meier
email: wilhelm.meier@xxxxxxxx

_______________________________________________
Pam-list mailing list
Pam-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/pam-list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux