Page 1 of 1
Using "w" fails to display online users
Posted:
Fri Feb 14, 2003 4:16 am
by noct
Ever since I started using grsecurity on the 2.4.20 kernel I can no longer see who is logged in(normal level user) when using the "w" command. The "who" command still displays who is logged in, has anyone else experienced this? No issues with grsecurity on 2.4.18. I find it weird that who still shows whos on and w doesnt, and as root w works. Any help appreciated.
Posted:
Fri Feb 14, 2003 8:22 am
by spender
This has been explained several times before. "w" uses /proc to generate its output, and the /proc restrictions keep it from getting that info. "who" uses /var/log/wtmp and /var/run/utmp. If you want to restrict who as well, make /var/log/wtmp and /var/run/utmp sgid utmp and remove their world-readable permission, and make who sgid utmp.
-Brad
Posted:
Sat Feb 15, 2003 6:54 pm
by noct
Thats fine, how about not restricting that particular file that it reads from /proc so "w" works?
Posted:
Sat Feb 15, 2003 8:38 pm
by spender
It's not a single file. w relies on the very thing that /proc restrictions stop, being able to view info on all processes running on the system.
-Brad