LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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: 70

Rep: Reputation: 0
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: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
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: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
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


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
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


All times are GMT -5. The time now is 02:20 AM.

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