sudo "last login" message and how to turn it off FreeBSD8.0

Anh Ky Huynh xkyanh at gmail.com
Fri Jun 25 02:01:57 UTC 2010


On Thu, 24 Jun 2010 13:41:04 -0500
Martin McCormick <martin at dc.cis.okstate.edu> wrote:

> I have actually seen this on some FreeBSD6.3 systems and thought
> it was a querk. It may still be a querk but it has started again
> on an 8.0 system. I think I am doing something to cause it, but
> I am not sure.
> 
> 	When one executes a sudo command, I get a "last login"
> message which reflects the last time I ran sudo. Example:
> 
> [martin at pilot ~]$ sudo whoami
> Password:
> Last login: Thu Jun 24 13:07:20 from pilot.it.okstate
> root
> 
> 	There is another FreeBSD8.0 system here that has not yet
> behaved this way so I did something to the test system to make
> it start.
> 
> 	Any ideas as to what to look at?

I experienced the same problem and I just disabled /var/log/{userlog,lastlog}:

# ls -ltro /var/log/|grep uchg
-rw-------  1 root  wheel  uappnd,uchg,uunlnk      1 May  9 08:59 userlog
-rw-r--r--  1 root  wheel  uappnd,uchg,uunlnk      1 May  9 18:50 lastlog

Hope this helps.

Regards,

-- 
Anh Ky Huynh


More information about the freebsd-questions mailing list