LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-27-2011, 06:19 AM   #1
narke
Member
 
Registered: Apr 2010
Posts: 197

Rep: Reputation: 5
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
 
Old 05-27-2011, 06:35 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Add the program you want to run to the users ~/.bashrc file and add the logout-command after that.
 
Old 05-27-2011, 12:51 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
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.
 
  


Reply



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
Run script after auto login on graphical system Lieve Linux - Newbie 5 10-09-2009 04:59 AM
How to write a script with auto login ssh and then run commands? keber314 Linux - Server 13 02-16-2009 03:37 PM
Need to run a program after login on Ubuntu desktop 7.04 RVickers Ubuntu 3 07-16-2007 08:39 PM
auto login + run programs ferradura Slackware 11 10-04-2006 04:11 AM
Auto login and run firefox at a specific web page eraser Linux - Newbie 4 11-21-2004 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:16 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration