[plug] rlogin by default?

Bernard Blackham bernard at blackham.com.au
Tue Feb 26 06:18:17 WST 2002


On Tue, Feb 26, 2002 at 06:11:26AM +0800, John Breen wrote:
> On a "normal" tty the login process is handled by "login", which then
> passes control to getty, mgetty, etc...
> 
> I would like to be able on my box to have a couple of ttys which do
> "rlogin" by default.  That is, I want to log in on the tty directly to
> snother machine without having to login and use ssh to connect and login
> again.
> 
> Is this do-able?  I thought /etc/inittab would help but apparently not.

John,

This is what I have done on my machine. There are probably better
ways, but:

In /etc/inittab:

----
6:2345:respawn:/sbin/getty -n -l /sbin/remotegetty 38400 tty6
----

And /sbin/remotegetty (another of my dodgy scripts :)

----
#!/bin/sh

clear
echo "Server: dagobah.home"
echo -n "Username: "
read
su - nobody -c "rsh -l $REPLY dagobah.home"
----

The su on the last line is to avoid my rhosts (*cough*, internal
network) letting people/me log in passwordless (it otherwise runs as
the root user).

You could probably neaten this solution up and have the server name
as a parameter or something more elegant, but this is what I use and
it works.

HTH,

Bernard.

-- 
 Bernard Blackham
 bernard at blackham.com.au



More information about the plug mailing list