wiml@milton.u.washington.edu (William Lewis) (05/06/91)
|In article <1991Apr8.191201.3255@daffy.cs.wisc.edu> sparkie@picard.cs.wisc.edu (Mark J. Horn) writes: |I've been having some unix problems on my '030 cube running NS 2.0. The |problem _was_ that when I logged in to my machine and opened up Terminal |and did a "who" I only got the following: | |uhura> who |sparkie console Apr 8 12:46 |uhura> | |This is obviosly wrong, since I was using ttyp1 with Terminal. Well, I noticed |that if I did the same thing as root I didn't have this problem: | |uhura# who |root console Apr 8 12:32 |root ttyp1 Apr 8 12:35 (uhura) |uhura# | |This is what I expected to get the first time. Well it seemed apparant that |I wasn't able to write to /etc/utmp file. So I changed it to be world |writeable and that made things work. The problem is that this is not the way |it ought to be done. On every other unix machine I've used something like |/bin/login is setuid root and this takes care of adding an entry to utmp. On |my next /bin/login IS setuid root, but it still doesn't work. I'm not sure, but I think /bin/login isn't being run. When you login on the console, your login goes through loginwindow, which probably updates the utmp entry for console. But when you start up a new shell window, you don't log in again, and you don't run /bin/login, so /etc/utmp doesn't get updated. I'm not sure why it *does* get updated when you log in as root... You might be able to fix this by taking just the utmp-modifying code from login's sources (any bsd sources should do) and putting it in your .login/.cshrc, and something to take it out in your .logout (I'm not sure which program has the task of removing utmp entries under conventional tty based unix ... ) This is more or less a hack, though. -- wiml@milton.acs.washington.edu Seattle, Washington (William Lewis) | 47 41' 15" N 122 42' 58" W "Just remember, wherever you go ... you're stuck there."
ta-aca@cunixb.cc.columbia.edu (Andrew C. Athan) (05/06/91)
> [utmp not being updated when I open new windows...]
Are you using Terminal or Stuart? If you are using Stuart ... have you
setuid'ed Stuart? This will do the trick.
aca
// Email: ta-aca@cunixb.cc.columbia.edu OR athan@cs.columbia.edu