Subject: Re: how to access a login shell
To: todd marek <todd@somahq.com>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: port-i386
Date: 05/20/2001 22:38:33
The "Not a login shell" message comes from csh (or one of its variants).
Rather than explaining the message and getting into the all-too-tangled mess
of various shells special casing the login program in different ways, I'll
try to answer what I think your real question is, which is "how do I let
my friend log in?"

I assume you have correctly created the user account.

If your friend intends to use your computer via telnet, then you need to make
sure that you have "pseudo-tty" devices configured (the GENERIC kernel has
them already), that you have the pseudo-tty devices enabled in the /etc/ttys
file:

	ttyp0	none				network
	ttyp1	none				network
	...

and that telnet is enabled in /etc/inetd.conf (or, if you prefer, that sshd
is properly configured and running, a task which is outside the scope of
what I'm willing to type right now...).

If your friend is standing right next to you and wants to use the console of
your PC to log in on, the easiest thing to do is for you to just log out. (*)
Your friend will be able to log in directly.

Trying to have two people logged in on the same console/pseudo-tty is
problematic; the csh message is trying to help your avoid the problems this
cause.  Other shells are less obstructive; sh and ksh will just do as you ask
and run the login process.  This may result in the login record file
(/etc/utmp) getting confused.

If you are running X windows, a compromise exists which should prevent
confusion:  create an xterm window, and type the command "exec login" in that
window.  A login process should be created without any guff from the shell,
and I think the utmp accounting will be properly maintained.  That will give
your friend a window on the console screen which is his to use (remind him
that a good guest will not mess with the other windows on the screen).


(*) If you have the wscons driver set up to allow multiple logical screens on
the console, then if the alternate screens are configured in /etc/ttys to have
login processes, your friend can use the console without your logging out (I
forget off hand how to switch between virtual screens, though).