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

2010-06-24 Thread Martin McCormick
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:

[mar...@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?

Thank you.

Martin McCormick
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


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

2010-06-24 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 24/06/2010 19:41:04, Martin McCormick wrote:
   When one executes a sudo command, I get a last login
 message which reflects the last time I ran sudo. Example:

   Any ideas as to what to look at?

/usr/local/etc/pam.d/sudo probably.  The 'last login' message usually
comes from login(1), but I don't see why sudo(8) would invoke login
unless you were running 'sudo -i ...'

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwjqvcACgkQ8Mjk52CukIwujgCeMHtly4qM+OBb0DeuqkhEW6se
syAAniA6VgJ86bUgWHS90TVDb9d73i1k
=gz+A
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


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

2010-06-24 Thread Anh Ky Huynh
On Thu, 24 Jun 2010 13:41:04 -0500
Martin McCormick mar...@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:
 
 [mar...@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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org