Re: [ilugd] Script to run at login but for non-root users only

2010-11-12 Thread Chirag Anand
You can use the local versions .profile and .bashrc in the user's $HOME which won't affect the whole system. On Fri, Nov 12, 2010 at 1:14 PM, Amit Sharma amit_...@yahoo.com wrote: Hi, I want to run a script as soon as a non-root users logs in. For that if I make a entry in /etc/proile then

Re: [ilugd] Script to run at login but for non-root users only

2010-11-12 Thread Mahesh T. Pai
Amit Sharma said on Thu, Nov 11, 2010 at 11:44:10PM -0800,: For that if I make a entry in /etc/proile then it runs for root also. Files in the /etc/ directory are system wide configuration files. The solution is already mentioned, -- Mahesh T. Pai ||

Re: [ilugd] Script to run at login but for non-root users only

2010-11-12 Thread Raj Mathur (राज माथुर)
On Friday 12 Nov 2010, Amit Sharma wrote: I want to run a script as soon as a non-root users logs in. If your script is named /usr/local/bin/foo.sh, try this in /etc/profile: # Only run foo.sh for non-root users [ `id -u` -ne 0 ] /usr/local/bin/foo.sh Regards, -- Raju -- Raj Mathur

Re: [ilugd] Script to run at login but for non-root users only

2010-11-12 Thread Aman Thakur
I think raju gave the exact answer you needed.:) and even the vivek's answer was quite reasonable.Even i am gonna try this scripts.thanks guys:) ___ Ilugd mailing list Ilugd@lists.linux-delhi.org

[ilugd] Script to run at login but for non-root users only

2010-11-11 Thread Amit Sharma
Hi,   I want to run a script as soon as a non-root users logs in.   For that if I make a entry in /etc/proile then it runs for root also.   I also tried it in /etc/bashrc but still it runs for root user as well.   I do not want to make individual entry in all user's home directory in

Re: [ilugd] Script to run at login but for non-root users only

2010-11-11 Thread Vivek Kapoor
On Thu, 11 Nov 2010 23:44:10 -0800 (PST), Amit Sharma amit_...@yahoo.com wrote: Hi,   I want to run a script as soon as a non-root users logs in.   For that if I make a entry in /etc/proile then it runs for root also.   I also tried it in /etc/bashrc but still it runs for root user as well.