Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The telnet login fails if the user has no password

0 views
Skip to first unread message

lovecreatesbea...@gmail.com

unread,
May 28, 2008, 10:30:16 PM5/28/08
to
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.
$

Ben Morrow

unread,
May 28, 2008, 11:00:42 PM5/28/08
to

Quoth "lovecreatesbea...@gmail.com" <lovecrea...@gmail.com>:

> 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] b...@morrow.me.uk

lovecreatesbea...@gmail.com

unread,
May 28, 2008, 11:40:07 PM5/28/08
to
On May 29, 11:00 am, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth "lovecreatesbea...@gmail.com" <lovecreatesbea...@gmail.com>:

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

J. Gleixner

unread,
May 29, 2008, 12:12:18 PM5/29/08
to

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

0 new messages