![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What happens when user logout? | yhacks | Linux | 1 | 05-16-2008 02:20 AM |
| Executing script with root privilages from a user login | checkpro | SCO | 1 | 03-11-2008 06:03 PM |
| Shell script to find when user su'ed to root | jrvilino | Shell Programming and Scripting | 1 | 03-05-2008 10:31 AM |
| root executes a script as another user | tads98 | Shell Programming and Scripting | 1 | 05-17-2005 08:54 AM |
| Canīt logout to user inactive | lalox | UNIX for Dummies Questions & Answers | 1 | 07-31-2004 09:31 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
run a script on logout by a non-root user
hi ,
i need to run a script that delete files when i logout as a user other than root user . I have tried out using .bash_logout but that doesnt seem to work , so any alternative for this to be done. Thanks in advance, Harsha |
|
||||
|
Thats true , but what i need is ,
to write the 'trap rm' command (as mentioned in your reply ), in the file which is accessible by a normal user . I need to insert this command through my program as a normal user. (/etc/profile can be changed only by the root!!) Is there any way out for this prob? |
|
||||
|
If you want to set a trap for a single user, you can add it to the user's $HOME/.profile
Perhaps you could explain a bit more about the problem you are trying to solve. If you are using bash and the .bash_logout is not being executed, that is of course also something to look into. |
|
||||
|
Need to make a script run from my program which deletes certain files as and when the user logouts from the GNOME log screen.
This program is run by a normal user (not the root user). If I write the required commands in $HOME/.profile , the files get deleted when ever the user logs in again , but i need to delete the files immediately after the user logs out. i believe .bash_logout doesnt not work if we use GNOME log screen for logging off. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|