Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-06-2005, 08:48 AM
|
#1
|
Member
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264
Rep:
|
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)
|
|
|
09-06-2005, 12:36 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
09-06-2005, 03:24 PM
|
#3
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
All times are GMT -5. The time now is 01:11 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|