LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-21-2005, 07:11 AM   #1
rharris72
Member
 
Registered: Nov 2005
Posts: 32

Rep: Reputation: 15
user log in and autoruns script


is there away of getting a script to autorun once a user has logged into the server via putty

thanks
 
Old 11-21-2005, 09:14 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,437

Rep: Reputation: 93
Edit the user's .bashrc if his shell is bash and add something like :

Code:
if [ ! -z "$SSH_CONNECTION" ]; then
    echo "Welcome ssh user"
    /path/to/script/to/execute
fi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do Autoruns work? TGWDNGHN Programming 6 10-01-2005 07:58 PM
how to log user commands in xterm without using "script" command lilachb Linux - General 2 08-28-2005 01:08 AM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
Cant only log in as root after user log-in. ADJenkins Linux - General 2 11-17-2004 04:18 PM
Log Out root Then Log In As Other User xtremcoder Linux - General 4 10-04-2004 11:01 PM


All times are GMT -5. The time now is 11:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration