Xref: utzoo comp.sys.att:8438 unix-pc.general:4473 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!uvm-gen!banzai!jay From: jay@banzai.PCC.COM (Jay Schuster) Newsgroups: comp.sys.att,unix-pc.general Subject: Re: Uniquely identifying a user: is it possible? Message-ID: <1990Jan10.013922.28402@banzai.PCC.COM> Date: 10 Jan 90 01:39:22 GMT References: <25730@cup.portal.com> Organization: The People's Computer Company, Williston, VT Lines: 25 thad@cup.portal.com (Thad P Floryan) writes: >In any event, what this all boils down to is the "simple" question: > ===> Is there a way to 100% positively, absolutely, unequivocally, <=== > ===> unerringly identify the current login user's /etc/utmp session <=== > ===> record under ALL conditions of su'iness and output redirection <=== > ===> and multiple simultaneous logins? <=== Without reading /dev/kmem, I believe not. If there was some way of getting your tty group ID, you could search through utmp and find its pid there. But I don't think there's any wany of finding your tty group id without searching through /dev/kmem. End even then, if the process had detached itself (called setpgrp()), it has no controlling terminal, and you wouldn't be able to find its tty slot because the kernel will tell you that it has none. >Sounds simple, no? It doesn't sound simple, because UNIX doesn't really care what tty you are logged on to, and loses that information rather easily. It cares about the uid you are, but allows you to change it (su). -- Jay Schuster uunet!uvm-gen!banzai!jay, attmail!banzai!jay The People's Computer Company `Revolutionary Programming'