<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

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