LinuxQuestions.org
Review your favorite Linux distribution.
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, 08: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, 12:36 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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, 03:24 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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 09:35 PM
Problem regarding logoff anoopkv1 Linux - Software 1 03-30-2005 11:56 AM
Where is the logoff button? pe2338 LQ Suggestions & Feedback 2 08-08-2003 01:06 AM
Logoff problem Shad-Darim Linux - Newbie 5 07-21-2003 03:07 PM
X Windows LOGOFF anima_a_ignifer Linux - Software 0 11-06-2002 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:38 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
Open Source Consulting | Domain Registration