Is there any way to hide a particular user's login entry from other users who run the last command?
Hiding User from Last Command
linux;users
The output of last(1) comes from the traditional wtmp file (usually /var/log/wtmp). As you might imagine, this file isn't writeable by ordinary users (on this box, it belongs to root:wtmp).Traditionally, the getty was responsible for maintaining wtmp, but these days it's PAM, by means of pam_lastlog.so, which also maintains /var/log/lastlog.If you're the computer's superuser, you can go to /etc/pam.d and comment out the pam_lastlog.so line from wherever it appears in there, as appropriate. On my machine, it's used only in the login file. Of course, if you're the computer's superuser, you can also replace last and lastlog with a wrapper script that does something like last.orig | fgrep -v some_user.If you're not the computer's superuser, and the site you're on uses this scheme, there's nothing you can do about it. In terms of both legality and permissions, you can't stop the system from logging your logins and logouts.