LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 09-06-2005, 09:48 AM   #1
wwnexc
Member
 
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264

Rep: Reputation: 30
logoff scripts


How can i write a script which runs every time a user logs off?

How would i do this that it runs for every user and how would i do this for only one user?

I am using slackware 10. The shell should be bash (i am not sure. it shows user@computer:~$ at the command prompt)
 
Old 09-06-2005, 01:36 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
From "man bash":
Quote:
~/.bash_logout
The individual login shell cleanup file, executed when a login shell exits
You'll need to be careful depending on what you are trying to achieve to make sure that dropped connections etc are dealt with properly.
 
Old 09-06-2005, 04:24 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
In addition to what David said:

As for the "for all users" - there's no generic way, you
can give them all an (identical?) ~/.bash_logoff ...

If you tell us WHAT kind of clean-up work you envisage
we can probably come up with more ideas.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Force logoff Harlin Linux - General 2 07-24-2005 10:35 PM
Problem regarding logoff anoopkv1 Linux - Software 1 03-30-2005 12:56 PM
Where is the logoff button? pe2338 LQ Suggestions & Feedback 2 08-08-2003 02:06 AM
Logoff problem Shad-Darim Linux - Newbie 5 07-21-2003 04:07 PM
X Windows LOGOFF anima_a_ignifer Linux - Software 0 11-06-2002 08:23 AM


All times are GMT -5. The time now is 09:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration