APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

login runs Pick automatically autologin




From: DM <dont_spam_me@reply_to_group.instead>
Subject: Re: converting corp from NT to Linux - carrige return
Date: Wed, 17 Aug 2005 10:55:12 -0400
Message-ID: <1124289899.524561@nnrp1.phx1.gblx.net> 
References: <1124140229.363896@nnrp1.phx1.gblx.net>
<slrndg2681.ggr.postmaster@andor.dropbear.id.au> Paul Colquhoun wrote: > On Mon, 15 Aug 2005 17:20:35 -0400, DM <dont_spam_me@reply_to_group.instead> wrote: > | Running RHES 3.0 on an intel box. > | > | How do I send a carrige return to an application from a bash script? > | > | We run an app called Pick, which users telnet into ( I don't want the > | lecture on telnet - thanks ). To make the unit turnkey (so the users get > | the Pick login prompt when they connect via telnet ), I've edited the > | /etc/xinetd.d/telnet file to read as follows: > | > | # default: on > | # description: The telnet server serves telnet sessions; it uses \ > | # unencrypted username/password pairs for authentication. > | service telnet > |{ > | disable = no > | flags = REUSE > | socket_type = stream > | wait = no > | user = root > | server = /usr/sbin/in.telnetd > | server_args = -L /usr/bin/tnet > | log_on_failure += USERID > |} > | > | and I created this simple script, as called in server_args line: > | > | #!/bin/bash > | # Simple script to bypass Linux login for Pick > | exec /usr/bin/d3 > > > What does /usr/bin/d3 do? Why do you need the script at all, why not just > put /usr/bin/d3 into the server_args line? > > > | This is what happens when they connect: > | > | > | Red Hat Enterprise Linux ES release 3 (Taroon Update 5) > | Kernel 2.4.21-32.0.1.ELsmp on an i686 > | > | /dev/pts/2: Connected to Virtual Machine 'pick0:LINUX'. > | > | > | > | And the user has to hit the enter key - big deal, I know, in fact I have > | 50 Linux boxes all over the country running Linux and Pick but theres' > | only about 5-10 users in each office, so it was never a big issue. We > | currently run MS 2000 server for our corp office, and I am converting us > | to Linux. NT(2000) drops you right to a login on telnet connection - so > | needless to say, I HAVE to be able to fix this little thing. > | > | NOW THEN - I thoght it may be as simple as sending a carrige return > | after the exec line in the tnet script, but I can't get it to work. I > | used many options of echo "\r \n " " , etc"..... > > > Nothing after the exec line will have any efect. The exec throws away the > script it is in and replaces it with the supplied argument script. > > I found a solution - if it helps anyone. I needed to do this in my script: exec /usr/bin/d3 -d "\r" This way d3 passes the return character and problem solved.

Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> login runs Pick automatically



Increase ad revenue 50-250% with Ezoic

Kerio Samepage


Have you tried Searching this site?

Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us