LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Auto run and only run a program after login? (http://www.linuxquestions.org/questions/slackware-14/auto-run-and-only-run-a-program-after-login-883011/)

narke 05-27-2011 07:19 AM

Auto run and only run a program after login?
 
Hi,

I want to set up a special user, when this user login in locally or remotely, a special program will get run for him. After this program exist normally or not, the telnet connection should close.

How can I do this in slackware?

Thanks in advance.

-
narke

TobiSGD 05-27-2011 07:35 AM

Add the program you want to run to the users ~/.bashrc file and add the logout-command after that.

Woodsman 05-27-2011 01:51 PM

Perhaps the following will help:

Harmonizing the Bash Startup Scripts

Don't be surprised if you hear from some people recommending you not to use telnet. Generally, that is reasonable advice. If you are running telnet on your own private LAN then security is not as significant an issue as for some people. You can run telnet inside the inetd tcp wrapper.

If you decide to stop using telnet and use ssh, then consider creating a public and private key. Upload the public key to the remote connection. Then your special account can connect without passwords, which is nice if you want to automate the process.


All times are GMT -5. The time now is 05:10 PM.