Xref: utzoo comp.sys.att:4009 unix-pc.general:1257 comp.unix.questions:8809 Path: utzoo!utgpu!attcan!uunet!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: comp.sys.att,unix-pc.general,comp.unix.questions Subject: Re: username problem Summary: (getlogin() == "LOGIN") is a result of multiple console gettys. Keywords: unixpc multiple console window getty cuserid(3C) getlogin(3C) Message-ID: <4490@cbmvax.UUCP> Date: 15 Aug 88 17:44:53 GMT References: <578@proxftl.UUCP> Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 30 In article <578@proxftl.UUCP> aaron@proxftl.UUCP (Aaron Zimmerman) writes: >I have a curious problem on my 3b1... >$ who am i >aaron w4 Aug 12 08:01 >$ passwd >Changing password for LOGIN This means: 1) You have more than one getty on /dev/window. 2) You are currently logged in on the 2nd (or 3rd ...) window getty. 3) The 1st window getty is idle (not logged in) The passwd command is calling getlogin() or cuserid() which, upon noticing that you are logged in on a window, searches /etc/utmp for the FIRST entry for ANY window. It finds the "LOGIN" process before it finds your "aaron" entry and returns that. It's an unfortunate side-effect of multiple console gettys. It could be fixed, but no one's done it yet. I doubt AT&T will fix it because the support folks probably don't want to support the multiple gettys. Maybe someday someone will make a shared library patch. -- -=] Ford [=- . . (In Real Life: Mike Ditto) . : , ford@kenobi.cts.com This space under construction, ...!ucsd!elgar!ford pardon our dust. ditto@cbmvax.commodore.com