Subject: Re: (Wscons) Double login - split personality?
To: None <port-i386@netbsd.org>
From: Henry Nelson <henry@irm.nara.kindai.ac.jp>
List: port-i386
Date: 01/06/2001 12:14:57
> Here's the situation: when logged in on one screen (for example as
> "mr.bean") and mr.bean (or a person impersonating mr.bean) can login
> on the same machine. Huh?!
> Now call me whole but appears to be pretty schizophrenic.

Maybe, but it can be pretty convenient sometimes.

This gives me a chance to thank the people who gave me the hint to use
"/usr/bin/tty" to set certain environment variables according to the
the virtual console I log into.  The switch I settled on for .login
follows.  It works perfectly; logging in via [Ctrl]+F3 (netbsd/pc98)
automatically sets things up to do kana-kanji conversion:

if ("`/usr/bin/tty`" == "/dev/ttyv2") then
 /usr/local/bin/canuum -Uu
else if ("`/usr/bin/tty|sed 's/\/dev\/ttyp[0-4]/p/'`" == "p") then

# If you've got a better idea, send it this way.  TIA.

 echo ""
 echo -n "         Input Japanese? (Y/N): "
 set yesno=$<
 if ("$yesno" == "y" || "$yesno" == "Y") then
  /usr/local/bin/canuum -Uu
 endif
endif

> I guess this situation not only applies to wscons but to.......well.....

Not at all.  I do simultaneous logins to a couple of my machines via
telnet and serial consoles.

> My Q.:
> How  to lock out a login to the same account from a second mr.bean when the
> first mr.bean has already logged in ??

I hope someone answers this because while I am not worried about a second
mr.bean, I do run a public access guest account, and would like to limit
the (telnet) logins at any one time to about 20.  How is this done?

henry nelson