Re: How to mail the name of the user that logged off?

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

 



At 1:29 PM -0500 9/25/07, Mikkel L. Ellertson wrote:

>Tony Nelson wrote:
>> At 2:25 AM -0600 9/25/07, Frank Cox wrote:
>>> On Tue, 25 Sep 2007 01:19:51 -0700
>>> Brian Mury <brianmury@xxxxxxxxxxxxxx> wrote:
>>>
>>>> That would work, so long as the user doesn't modify ~/.bash_logout.
>>> chown root.root .bash_logout
>>> chmod 444 .bash_logout
>>> cp .bash_logout /etc/skel
>>>
>>> You're off to the races.
>>
>> The user can just rm .bash_logout and make a new one.  Try it.
>>
>> I suspect a working answer might involve PAM, session, and pam_exec.
>
>Dumb question - can you set PAM to run something when the user logs
>out? Everything I have seen using PAM is when you try to to do
>something, and PAM uses rules to see if you can do it. But the
>application has to ask for authentication. I do not see what would
>be calling PAM. logout is a Bash built-in command - I believe it is
>the same for other shells. The same thing for exit.

I think so.  From the source, pam_exec runs the command on both open
session and close session.  I don't see how to distinguish between the two,
or know for sure that it is called on close session.  The SAG says that
"session ...things that need to be done for the user before/after they can
be given service.  ...opening/closing...".
-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
      '                              <http://www.georgeanelson.com/>

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux