Subject: Re: how to access a login shell
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: todd marek <todd@somahq.com>
List: port-i386
Date: 05/20/2001 22:13:55
I appreciate the amount of thought that went into your response but actually
I'm a little to amateur to try to worry about other users right now.  I just
booted my machine for the second round (for this my second install on the
same machine) and added a non root account.  I tried then to save a file in
vi and got permission denied.  I tried switching to root and that didn't
work.  I also tried using su to change my permissions but since I couldn't
access the root account I could not change those.

Basically I'm trying to avoid a reboot and learn a little bit more about the
permissions system at the same time.

Thanks
--
Todd Marek
Soma HQ
748 W Irving Park Rd. Suite 1
Chicago, IL 60613

phone: 773.880.5421
email: todd@somahq.com
web: http://www.somahq.com

----------
>From: "John F. Woods" <jfw@jfwhome.funhouse.com>
>To: todd marek <todd@somahq.com>, port-i386@netbsd.org
>Subject: Re: how to access a login shell
>Date: Sun, May 20, 2001, 8:38 PM
>

> 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).