mit kerberos running on Gentoo Linux

Ken Raeburn raeburn at MIT.EDU
Mon Feb 9 12:00:08 EST 2009


On Feb 7, 2009, at 23:34, zhangweiwu at realss.com wrote:
> Dear all. I've installed mit version of kerberos V on my Gentoo Linux
> through the package repository (called portage in Gentoo). krlogin  
> works
> but krsh strangely quit with a message I don't understand:
>
> zhangweiwu at esmeralda:~$ krlogin emerson.realss.com
> Last login: Fri Feb  6 14:09:47 from 123.116.113.65
> Linux Pyrrhus 2.6.18.1-fl2f-v1.02 #41 Thu Jul 3 10:13:18 CST 2008  
> mips64
>
> The programs included with the RAYS GNU/Linux system are free  
> software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
>
> RAYS GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
> zhangweiwu at Pyrrhus:~$ exit
> logout
> Connection closed.
> zhangweiwu at esmeralda:~$ krsh emerson.realss.com
> usage: rlogin [ -8EL] [-e char] [ -l username ] host
>
> Should I complain to Gentoo packager or MIT or have problem of my own?

Kerberos rsh, like traditional BSD rsh, will run rlogin if you give it  
only a host name and no command to run.  So it needs to know the right  
rlogin program to run.  The one it's getting is clearly not the  
Kerberos rlogin program, so the Gentoo packager should be patching the  
rlogin source at the same time as renaming the installed commands.

It's probably complaining because krsh runs rlogin with the original  
argv[] argument list, with argv[0] still set to "krsh".  Traditional  
BSD rlogin and rsh -- but not MIT's Kerberos versions, because of the  
tendency of some sites to rename these Kerberos versions -- has the  
"feature" that you can invoke the rlogin program under another name,  
and it'll assume that that's the hostname, so you could run "emerson  
w" instead of "rsh emerson w" as a shorthand.  The programs figure  
this out by looking at argv[0] to see if it's "rsh" or "rlogin".  I  
expect the Gentoo "rlogin" program is doing the same, and since "krsh"  
isn't what it thinks is the program name, it thinks you've supplied  
two hostnames, "krsh" and "emerson.realss.com", so you get an error.   
(Since you *should* be running the Kerberos rlogin program which  
doesn't do this, we shouldn't really need to patch up the argv[] array  
to change the program name, but you're getting the wrong rlogin, so it  
matters.)

That's my guess... I haven't looked at the Gentoo rlogin program to  
see if that's what's really going on.  But you are getting the wrong  
rlogin program.

Ken



More information about the Kerberos mailing list