Xref: utzoo unix-pc.general:83 comp.sys.att:1797 comp.unix.wizards:5598 Path: utzoo!utgpu!water!watmath!uunet!seismo!sundc!hqda-ai!icus!quincy!lenny From: lenny@quincy.UUCP (Lenny Tropiano) Newsgroups: unix-pc.general,comp.sys.att,comp.unix.wizards Subject: getlogin(3C) returns bogus name Keywords: getlogin, username, login Message-ID: <74@quincy.UUCP> Date: 9 Dec 87 14:57:04 GMT Organization: American LP Systems, Inc., Islandia, NY Lines: 27 On my UNIX PC I have noticed a problem occasionally with the getlogin(3C) system call. At certain times I have noticed getlogin returning "LOGIN" or "rc" instead of the user's name who is logged in. I know what "LOGIN" and "rc" are, but why are they showing up for a valid logged-in user? This is quite strange... --- piece of code --- char *getlogin(); printf("User is: %s\n", getlogin()); --- end piece of code --- Any suggestions? I have recreated the /etc/utmp, /etc/wtmp and this hasn't cleared up the problem. Sometimes it goes away and other times it comes back. Thanks, Lenny -- Lenny Tropiano UUCP: ...uunet!godfre!quincy!lenny -or- American LP Systems, Inc. ...cmcl2!phri!bc-cis!icus!quincy!lenny -or- 1777-18 Veterans Memorial Hwy. ...mtune!quincy!lenny -or Islandia, New York 11722 +1 516-582-5525 ...ihnp4!icus!quincy!lenny