Is there a default way to run commands on user's logout?
By John Parsons •
I want to log the logins/logouts of my users.
For the logins I only need to modify /etc/profile and add my command or edit any .profile for an specific user.
But for the logouts I don't know if there is a default/centralized way to do it like /etc/profile for logins.
I see some example for CLI sessions, but I want to register GUI/CLI sessions.
Thanks
51 Answer
Found this thread:
From the manual (man bash):
When a login shell exits, bash reads and executes commands from the files ~/.bash_logout and /etc/bash.bash_logout, if the files exists. 2 More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"