Find and delete logout script
Hi all,
I have to remove (or deactive) a script a previous system administrator installed on a server. When a user logs out, when you type exit, the following is displayed: Code:
logout Thanks in advance! |
Check for a file called .logout in the users' home directory. If its running the slocate update, rename it, remove it, or remove executable permissions from that file.
|
Quote:
|
Hmm.. I did a quick search and can't seem to find the global equivalent of .logout. Anyway just to clarify, did you check /home/user1/.logout instead of /home/.logout?
Also if this is happening for each shell that is closed, you might also want to check for the existence of something like /home/user1/.bash_logout or /etc/bash.logout. |
Take a look in
/etc/bash.bashrc |
Quote:
Code:
# ~/.bash_logout Code:
# /etc/bashrc |
I did looked into it and actually I don't know which are all scripts will be executed
when user ends his session (logout) But nevertheless there should also be some indirect way: (Correct me if I am wrong!!!) First we have to know actually which script does this updation? So try to grep the string "updating slocate database" like as shown below: grep -R "updating slocate database" . From this try to get which all scripts are trying to do this activity and remove/deactivate those scripts. Please also let me know if it works!!! |
Quote:
(Maybe there is an option to give the search process absolute priority? to speed it up a little) |
Quote:
|
Dont know if it will help, but each user on my system as a ".bash_logout"
Code:
cat .bash_logout |
Could be in /etc/profile, /etc/bashrc, see also the user's .bashrc, .bash_profile. Could be set as a fn in there. He may also have altered the example in /etc/skel, if there is one.
|
All times are GMT -5. The time now is 08:29 AM. |