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                r...@kandalaya.org      http://kandalaya.org/
       GPG: 78D4 FC67 367F 40E2 0DD5  0FEF C968 D0EF CC68 D17F
PsyTrance & Chill: http://schizoid.in/   ||   It is the mind that moves

_______________________________________________
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to