Re: Sudo Commands on New 6.2 System Cause Last Login Message.

2008-04-03 Thread Tom McLaughlin

On Thu, 2008-04-03 at 12:06 -0500, Martin McCormick wrote:
>   I noticed that every sudo command I issue is accompanied
> by a "Last login" message.
> 
> 25testokcns root $ls .hushlogin
> ls: .hushlogin: No such file or directory
> 26testokcns root $sudo touch .hushlogin
> Last login: Thu Apr  3 11:38:24 from testokcns.osuokc
> 27testokcns root $sudo date
> Last login: Thu Apr  3 11:41:10 from testokcns.osuokc
> Thu Apr  3 11:41:17 CDT 2008
> 
> I was trying to see if a .hushlogin file in /root might snuff
> out the messages, but it had no effect.
> 
> The commands always work but I would rather not get that message
> each time. Am I missing something obvious?
> 
>   Thanks.

Make sure you have the latest version of the sudo port.  This issue
where pam_lastlog was being called because the system pam.d file was
included in the session section of sudo's pam file was fixed.

tom

-- 
| tmclaugh at sdf.lonestar.org tmclaugh at FreeBSD.org |
| FreeBSD   http://www.FreeBSD.org |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Sudo Commands on New 6.2 System Cause Last Login Message.

2008-04-03 Thread David Robillard
> The commands always work but I would rather not get that message
> each time. Am I missing something obvious?

A quick google search will show you that it's the
${LOCALBASE}/etc/pam.d/sudo file which is the root of your "problem".
It's pam_lastlog(8) which makes the message.  If you don't need it,
comment out the...

session include system

... line in ${LOCALBASE}/etc/pam.d/sudo to get rid of this behavior.

Cheers,

David
-- 
David Robillard
UNIX systems administrator & Oracle DBA
CISSP, RHCE & Sun Certified Security Administrator
Montreal: +1 514 966 0122
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Sudo Commands on New 6.2 System Cause Last Login Message.

2008-04-03 Thread Martin McCormick
Steven Friedrich writes:
>> 26testokcns root $sudo touch .hushlogin
>Well, it IS odd that you're using sudo when logged in as root 8o)

I was cd'd to the /root directory, but was logged in as
me. It kind of got me there for a second, but notice the $ in
the prompt.

Interestingly enough, sudo -v doesn't cause this
message.

>Did you edit /usr/local/etc/sudoers ?
>I tried you're commands here and I don't get the Last login message.

I am not getting it on most other FreeBSD systems except
the newest 2 systems I just finished updating in the last couple
of days.

>In sudoers, do you have "rootALL=(ALL) ALL" ?

Yes. That's where I added all of the users who can sudo. I even
copied it out of another sudoers file so as not to miss anybody.

The FreeBSD version I am using is
FreeBSD 6.2-RELEASE-p11

Interestingly, the system I am on right this minute is the same
version and does not exhibit this behavior.

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


Re: Sudo Commands on New 6.2 System Cause Last Login Message.

2008-04-03 Thread Steven Friedrich
On Thursday 03 April 2008 01:06:37 pm Martin McCormick wrote:
>   I noticed that every sudo command I issue is accompanied
> by a "Last login" message.
>
> 25testokcns root $ls .hushlogin
> ls: .hushlogin: No such file or directory
> 26testokcns root $sudo touch .hushlogin
> Last login: Thu Apr  3 11:38:24 from testokcns.osuokc
> 27testokcns root $sudo date
> Last login: Thu Apr  3 11:41:10 from testokcns.osuokc
> Thu Apr  3 11:41:17 CDT 2008
>
> I was trying to see if a .hushlogin file in /root might snuff
> out the messages, but it had no effect.
>
> The commands always work but I would rather not get that message
> each time. Am I missing something obvious?
>
>   Thanks.
>
>
> Martin McCormick WB5AGZ  Stillwater, OK
> Systems Engineer
> OSU Information Technology Department Network Operations Group
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"

Well, it IS odd that you're using sudo when logged in as root 8o)
Did you edit /usr/local/etc/sudoers ?
I tried you're commands here and I don't get the Last login message.
I'm currently running 7.0-RELEASE, but this machine was originally installed 
way back during 5.x days and I installed sudo way back then.
In sudoers, do you have "rootALL=(ALL) ALL" ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"