Click here to get back home

The telnet login fails if the user has no password

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
The telnet login fails if the user has no password lovecreatesbea...@gmail.com 05-28-2008
Posted by lovecreatesbea...@gmail.com on May 28, 2008, 10:30 pm
Please log in for more thread options
The telnet login fails if the user has no password. I mean the user is
not prompted with the ``Password:'' string and log in, as shown in
below case 2.

        $cnn->login($user, $pass);

It works in case 1. How can I make a script work with both cases?

Thank you.



CASE 1:

$ telnet 192.168.4.30
Trying 192.168.4.30...
Connected to 192.168.4.30.
Escape character is '^]'.

login: guest
Password:
[guest@BS2000e-1 ~]$ exit
logout
Connection closed by foreign host.
$


CASE 2:

$ telnet 192.168.5.10
Trying 192.168.5.10...
Connected to 192.168.5.10.
Escape character is '^]'.

login: guest
[guest@BS3000e-0 test]$ exit

logout
Connection closed by foreign host.
$

Posted by Ben Morrow on May 28, 2008, 11:00 pm
Please log in for more thread options

> The telnet login fails if the user has no password.

I sincerely hope you have good firewalls, if you are allowing telnet
logins without a password.

> I mean the user is not prompted with the ``Password:'' string and log
> in, as shown in below case 2.
>
> $cnn->login($user, $pass);
>
> It works in case 1. How can I make a script work with both cases?

As it says in the docs, if ->login doesn't do what you want, use ->print
and ->waitfor instead.

Ben

--
Every twenty-four hours about 34k children die from the effects of poverty.
Meanwhile, the latest estimate is that 2800 people died on 9/11, so it's like
that image, that ghastly, grey-billowing, double-barrelled fall, repeated
twelve times every day. Full of children. [Iain Banks] ben@morrow.me.uk

Posted by lovecreatesbea...@gmail.com on May 28, 2008, 11:40 pm
Please log in for more thread options
>
> > The telnet login fails if the user has no password.
>
> I sincerely hope you have good firewalls, if you are allowing telnet
> logins without a password.
>
> > I mean the user is not prompted with the ``Password:'' string and log
> > in, as shown in below case 2.
>
> > $cnn->login($user, $pass);
>
> > It works in case 1. How can I make a script work with both cases?
>
> As it says in the docs, if ->login doesn't do what you want, use ->print
> and ->waitfor instead.
>

Thanks, I just read it. Does ->print display password on terminal and
anybody sees it? Does the ->login work this way also?

Posted by J. Gleixner on May 29, 2008, 12:12 pm
Please log in for more thread options
lovecreatesbea...@gmail.com wrote:
>>
>>> The telnet login fails if the user has no password.
>> I sincerely hope you have good firewalls, if you are allowing telnet
>> logins without a password.
>>
>>> I mean the user is not prompted with the ``Password:'' string and log
>>> in, as shown in below case 2.
>>> $cnn->login($user, $pass);
>>> It works in case 1. How can I make a script work with both cases?
>> As it says in the docs, if ->login doesn't do what you want, use ->print
>> and ->waitfor instead.
>>
>
> Thanks, I just read it. Does ->print display password on terminal and
> anybody sees it? Does the ->login work this way also?

Why ask? Both of those are questions you can answer yourself by
trying the methods.

Similar ThreadsPosted
Net::Telnet, wrong prompt, user not needed only password is requested October 27, 2006, 2:51 pm
Net::Telnet, wrong prompt, user not needed only password is requested October 27, 2006, 2:52 pm
user login February 20, 2005, 3:08 pm
Password-protected login problem November 14, 2004, 2:58 pm
How to interactively sending the username/password to login using ssh October 25, 2007, 7:11 pm
Active Directory login User November 17, 2004, 11:23 pm
Search Beta Test :secure login without Password April 14, 2005, 3:53 am
Re: download with HTML::FORM login and password on page April 28, 2008, 7:43 am
Automating form login and dropping off user on remote site May 6, 2005, 4:41 am
FAQ 8.9: How do I ask the user for a password? November 20, 2004, 12:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap