Results 1 to 4 of 4
hi friends,
i am trying to run a bash script at the time of a login of any user .
i have made an entry in the .bashrc .
i ...
- 08-15-2008 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 20
running a bash script on login
hi friends,
i am trying to run a bash script at the time of a login of any user .
i have made an entry in the .bashrc .
i have also tried making an enty in .bash_profile ,
The scripts only executes whenever the root logs in ..
Not when the other user logg in ,
Is there a file that is executed at the time of execution of any user.
thanks in advance,
anshul.
- 08-15-2008 #2
Did you write it in the root's .bash_rc? Then it's only for root.
You need to write it in /etc/bash.bashrc or /etc/profile in order to have it executed for all users.
- 08-15-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
In addition, check the man page of bash for a complete list of rc files, and in which order they are read.
As GNU-Fan already said, *everything* under a given $HOME directory is specific to that user and no one else, and /root/ is the $HOME for the "root" user.
- 08-16-2008 #4Just Joined!
- Join Date
- Jan 2008
- Posts
- 20
thankyou friends,
that was exactly what i was looking for...


Reply With Quote