[LUAU] rrlogin problems at line 62

Doug Stanfield DOUGS at oceanic.com
Sun Feb 7 03:01:50 PST 1999


There's a bunch of things that could cause that error.  Essentially it's
saying it couldn't talk to the login server.  It could be your
configuration, network problems, or the server.  I don't show anything
severe happening system wide today.  It could be just your connection.  If
you tell when this happened or if you'd like to send me your cable modem
serial number in a private email I'll look in the history.

I'm wondering about the order of the commands in your rc.local file.  My
suspicion might be that your system doesn't have an IP when you call
rrlogin.

I'd suggest trying the rrsmpcd client rather than the Perl script.  Its
known to do the right things where Ed's Perl script didn't do the whole
process.  Below is a copy of directions from Glen Nakamura about how to get
it.

-Doug-

I have released a new version of rrsmpcd (login client for road runner cable
modems). Version 0.12 includes changes from Al Youngwerth to fix client
status requests.  The source code is available at:

ftp://www.3rd-vertical.net/rrsmpcd/ <ftp://www.3rd-vertical.net/rrsmpcd/> 

Binaries (glibc2 only) for ix86 and alpha processors at:

ftp://www.3rd-vertical.net/rrsmpcd/binaries/

- glen

-----Original Message-----
From: HawaiiBuc [mailto:hawaiibuc at hawaii.rr.com]
Sent: Saturday, February 06, 1999 7:47 PM
To: luau
Subject: [LUAU] rrlogin problems at line 62


Aloha everyone,
  I'm using the dhcpc option for rrlogin, but I just got an error message
stating that there was no host found at line 62 of /sbin/rrlogin.  This is
the error message I got:
 
    no host: sms1 at /usr/local/bin/rrlogin line 62.
 
Before I get too far, this is what I put at the end of my /etc/rc.d/rc.local
file:
 
    dhcpcd
    rrlogin
    ifconfig
    sleep5
 
This is the line selected when I entered 'vi +62 /sbin/rrlogin':
 
$iaddr = inet_aton($remote) || die "no host: $remote";
 
If anyone can help me figure this out, I'd be very much appreciative.  This
has happened before and I just reinstalled the MD5 file, but this time that
didn't work.  Anyway, this is my whole rrlogin file:
 
#!/usr/bin/perl -w
#
# rrlogin - RoadRunner (Hawaii Only) Login Client
#
# $Id: rrlogin.pl,v 0.1 1998/01/29 21:03:25 edo Exp $
#
# Copyright (c) 1998 Ed Orcutt < edo at eosys.com <mailto:edo at eosys.com> >
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
require 5.002;
use strict;
use Socket;
use MD5; #  Perl interface to MD5 Message-Digest Algorithm
 
my ($username, $password, $Verbose);
 
# ------------------------------------------------------------------------
# CHANGE the username and password!!!
 
$username   = "USER"; # RoadRunner username
$password   = "PASS"; # RoadRunner password in lowercase ;-)
$Verbose    = 1;  # Print debugging messages if set
 
# ------------------------------------------------------------------------
# You really DO NOT want to change any of the values below
# unless you REALLY know what you are doing.
 
my ($Version_ID, $OS_ID, $OS_Version);
my ($protocol, $port, $remote, $iaddr, $paddr);
my ($parameters, $message, $bytes, $reply);
my ($MsgType, $MsgLen, $Session_ID);
my ($HashPwd, $Nonce);
my ($Pwd, $Blinding, $Credentials);
 
sub LoginResponse;
 
$Version_ID = 10;
$OS_ID      = "Linux";
 
$port       = 60000;  # TCP port for login/logout
$remote     = "sms1";  # Session Management Server
 
chop($OS_Version = `uname -r`); # Version of Linux kernel
 
# ------------------------------------------------------------------------
# Establish a connection to the Session Mgt Server port 60000/tcp
 
$protocol = getprotobyname('tcp');
$iaddr = inet_aton($remote) || die "no host: $remote";
$paddr = sockaddr_in($port, $iaddr);
 
socket(SOCK, AF_INET, SOCK_STREAM, $protocol) || die "socket: $!";
connect(SOCK, $paddr) || die "connect: $!";
 
# ------------------------------------------------------------------------
# We're connected, now build and send a "Login Request" message
 
$parameters = (pack "nn",  7, length($username)+4) . $username .
              (pack "nnn", 3, 6, $Version_ID) .
              (pack "nn",  4, length($OS_ID)+4) . $OS_ID .
              (pack "nn",  5, length($OS_Version)+4) . $OS_Version .
              (pack "nnn", 6, 6, 0) .
              (pack "nnn", 8, 6, 7777);
 
$message = (pack "nnN", 3, length($parameters)+8, 0) . $parameters;
 
$Verbose && print "Sending Login Request ...\n";
syswrite(SOCK, $message, length($message));
 
# ------------------------------------------------------------------------
# Read the response to our "Login Request"
 
$bytes = sysread(SOCK, $reply, 1024);
 
if ($bytes == 0) {
    $Verbose && print "No reply to our request, exiting!\n";
    exit 1;
}
 
# Decode the message type, length and session id
 
($MsgType, $MsgLen, $Session_ID) = unpack "nnN", substr($reply, 0, 8);
$Verbose && print "Recieved message type $MsgType, length $MsgLen, bytes
$bytes\n";
 
# We should have gotten an "Authenticate Response" message in reply.
# Unless the Username is not valid, and we get a "Login Response".
 
if ($MsgType == 5) {
    LoginResponse($reply);
    exit 3;
} elsif ($MsgType != 9) {
    $Verbose && print "Authenticate Response expected, but got message type
$MsgType instead, exiting!\n";
    exit 2;
}
 
# ------------------------------------------------------------------------
# Unpack the "Authenticate Response" message parameters
 
$HashPwd = unpack "n", substr($reply, 12, 2);
$Nonce = substr($reply, 18, 16);
 
# ------------------------------------------------------------------------
# Build and send a "Authenticate-Login Request" message
 
$Pwd = $HashPwd ? MD5->hash($password) : $password;
$Blinding = (pack "N", time());
$MsgType = (pack "n", 4);
$Credentials = MD5->hash($Nonce . $Pwd . $Blinding . $MsgType);
 
$message = (pack "nnN",  4, 36, 0) .
           (pack "nn",  11, 20)    . $Credentials .
           (pack "nn",  21,  8)    . $Blinding;
 
$Verbose && print "Sending Authenticate-Login Request ...\n";
syswrite(SOCK, $message, length($message));
 
# ------------------------------------------------------------------------
# Read the response to our "Authenticate-Login Request"
 
$bytes = sysread(SOCK, $reply, 1024);
if ($bytes == 0) {
    $Verbose && print "No reply to our request, exiting!\n";
    exit 1;
}
 
# Decode the message type, length and session id
 
($MsgType, $MsgLen, $Session_ID) = unpack "nnN", substr($reply, 0, 8);
$Verbose && print "Recieved message type $MsgType, length $MsgLen, bytes
$bytes\n";
 
# We should have gotten a "Login Response" message in reply
 
if ($MsgType != 5) {
    $Verbose && print "Login Response expected, but got message type
$MsgType instead, exiting!\n";
    exit 1;
}
 
LoginResponse($reply);
 
# ------------------------------------------------------------------------
# Close the connection to the Session Mgt Server
 
close(SOCK) || die "close: $!";
 
exit 1;
 
# ------------------------------------------------------------------------
# Decode a "Login Response" message
 
sub LoginResponse {
    my $msg = shift;
    my ($StatusCode, $ParamType, $ParamLen);
 
    # Unpack the "Status Code" parameter
 
    $StatusCode = unpack "n", substr($msg, 12, 2);
 
    if    ($StatusCode ==   0) { print "Login Successful!\n"; }
    elsif ($StatusCode ==   1) { print "Username was not found.\n"; }
    elsif ($StatusCode ==   2) { print "Password was incorrect.\n"; }
    elsif ($StatusCode ==   3) { print "Your account is disabled.\n"; }
    elsif ($StatusCode ==   4) { print "You have been disabled?\n"; }
    elsif ($StatusCode == 100) { print "Login Successful, but you are
already logged in.\n"; }
    elsif ($StatusCode == 101) { print "Login Authenticate retry limit
exceeded.\n"; }
    elsif ($StatusCode == 102) { print "Login Successful! But client
software is out of date?\n"; }
    elsif ($StatusCode == 103) { print "Login Failed! Client software
version is invalid.\n"; }
    elsif ($StatusCode == 500) { print "Server unknown error ;-)\n"; }
    elsif ($StatusCode == 501) { print "Server unable to perform username
validation.\n"; }
    elsif ($StatusCode == 502) { print "Server unable to perform password
validation.\n"; }
    else                       { print "Unknown Status code???\n"; }
 
    # Was there any "Response Text"? If so, print it
 
    ($ParamType, $ParamLen) = unpack "nn", substr($msg, 14, 4);
 
    if ($ParamType == 9) {
 print "Response Text: " . substr($msg, 18, $ParamLen) . "\n";
}
}

                                        Thanks in advance,
 
                                              Bud Jones




More information about the LUAU mailing list