Run bash script automatically after the root log in
Guys I am new to Linux ... I am using redhat ... I did a script which check if the one logging in is the root or jog but the problem is every time I want the bash script to run I should make right click and open terminal and type sh script.sh so if I want the script to run automatic after logging in what steps/commands should I write ???
|
Put the script in root's .bash_profile ... or .bashrc .
This is the first result of "when is bashrc called" in my search-foo, and it's a nice little explanation of the two, so rather than me reinventing the wheel, give it a read: http://www.joshstaiger.org/archives/...rofile_vs.html cheers, |
All times are GMT -5. The time now is 11:32 AM. |