Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello Everyone,
Ok what I am trying to do is setup a script that will launch a telnet session, and prompt for a username and password. I want the users to login to Linux, then instead of having them type in...
telnet
open 192.168.0.1
username
password
I want to have a script that runs automatically when any users logs in. So they enter their Linux username and password, press Enter and it takes them directly to enter their telnet session username and password. I'm new to Linux but I'm trying to save my company thousands and thousands of dollars. Right now about 50% of the computers here use nothing but this little telnet program, connecting to an AIX server. I don't see the point in paying for a full Windows 2000 Professional license for a simple telnet session. I'm going to make another post about how to use MS Active Directory accounts to log into Linux. Thanks for the help with this telnet problem.
Why does it need to be automatic. Can't you just get them to telnet once they login? If you want to save even more money you may want to look at thin clients: http://www.ltsp.org
I suppose you could add telnet hostname to their .bashrc file. Of course that would mean that they have no choice but to log into telnet when they log into linux.
Well, I don't want to go with thin clients because I might want the computers to do other things later on. For right now though, I'm trying to make it as easy as possible on the users. I'm sure you IT guys know that unless you make things easy enough for a two year old to do, some users just won't figure it out. So what would the script look like to get this done?
I don't think there is a way to pass the password automaticcaly without using ssh and authorised keys. You could do as Hangdog said and palace it into the login script. You may want to try it with the -l switch and the $USER variable but this would only work if the telnet server supports this type of login. you would still need to enter the password.
Maybe there is a way, looking at man telnet it refers to once a connection is made .telnetrc is run in the users home directory which contains a list of commands that are processed as if they were directly typed in, so going with that at first glance it looks possible unless I'm interpreting it wrong which wouldn't be a first
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.