Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a shell script that I want to be run each time a user logs on. I use Ubuntu as the OS. The script should be run after user logon in ubuntu.

Thanks for your help

share|improve this question

2 Answers 2

up vote 4 down vote accepted

In Ubuntu, any script ending in .sh that's placed in /etc/profile.d/ will be run whenever a user logs in. That's what lines 4-11 of /etc/profile do.

share|improve this answer

take a look at /etc/profile

share|improve this answer
    
Yes i have look at that, but i can't figure out where to put my shell script path so it should be run when user has logon to the computer. –  Frozzare Oct 24 '09 at 23:12
    
all files in /etc/profile.d/ are executed automatically, you dont have to setup an specail script path (whatever this should be) –  evildead Oct 25 '09 at 0:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.