Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2007 19:16:28 -0800
From:      Christopher Cowart <ccowart@rescomp.berkeley.edu>
To:        Kamil Kisiel <kamil@kamilkisiel.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: sudo never asks me for a password
Message-ID:  <20071124031628.GI43532@hal.rescomp.berkeley.edu>
In-Reply-To: <66d392400711231909h42ca826la5d8818864a78a4e@mail.gmail.com>
References:  <66d392400711231543x42aea684l3752bbbdcb65d2c5@mail.gmail.com> <20071124030410.GH43532@hal.rescomp.berkeley.edu> <66d392400711231909h42ca826la5d8818864a78a4e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--02TgiDMAH4DLwn5E
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 23, 2007 at 07:09:36PM -0800, Kamil Kisiel wrote:
> On 11/23/07, Christopher Cowart <ccowart@rescomp.berkeley.edu> wrote:
> > On Fri, Nov 23, 2007 at 03:43:39PM -0800, Kamil Kisiel wrote:
> > > For some reason, on this particular FreeBSD machine, sudo never asks
> > > me for a password, even if I haven't logged in for days.
> > >
> > > I've been struggling with this problem for some time but still haven't
> > > been able to find a solution. Any ideas?
> >
> > Maybe something is misconfigured in your pam stack? Check
> > /etc/pam.d/sudo.
>=20
> /etc/pam.d/sudo looks like this:
>=20
> #
> # $FreeBSD: src/etc/pam.d/su,v 1.16 2003/07/09 18:40:49 des Exp $
> #
> # PAM configuration for the "su" service
> #
>=20
> # auth
> auth            sufficient      pam_rootok.so           no_warn
> auth            sufficient      pam_self.so             no_warn
> auth            requisite       pam_group.so            no_warn
> group=3Dwheel root_only fail_safe
> auth            include         system
>=20
> # account
> account         include         system
>=20
> # session
> session         required        pam_permit.so

This looks like it was copied verbatim from su.

I suspect the pam_self.so is causing problems. Sudo authenticates the=20
user for their current account, not the target account. That line will=20
cause authentication to short-circuit on a UID match w/o any need to=20
provide a password. Try commenting it out.

--=20
Chris Cowart
Lead Systems Administrator
Network & Infrastructure Services, RSSP-IT
UC Berkeley

--02TgiDMAH4DLwn5E
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iQIVAwUBR0eXjCPHEDszU3zYAQLf9w/8DuWF9htJc19tik5kr2w4xfGLavU+/vkT
JsfM73/PfP/r+k6hpiilntxXjDrD1bUE2c7puFCmR1CxfextpaD+OmS2qaII18uw
vZGWyhihgBCT+4xWnxjIaS0aQY0kMFsa3B7Hkl4dcdqcDPqsqyK2qMieoP3/jMO5
hU3jWd0ZvMT0UFd+k43RQM70YQaKMtAN7utUVVHd9UDXxPtYT3u/wE+l4lFfROOR
JjHzYbRZxDN5d0GYQxB7aUaRX6oJzblavqPSqdF10AQlAX9AqeV6lOtqTMw058yy
NLKbpK5xO4ac7q21nmqzxOOZp/zvarVvlFrIcTlND/kibvtsgWJlheCVGI06j+YK
mloB9aKRWZuPSlSvGKP8IzcNJJOYpMCvC1Ftn0sKTnlYs5efaHW2l8ApzWiumUuA
C2IWnsFPbdc0up0SdCOINKBqZSU/RamMLCflxJTZACMJEetc7WBHqQn6xb91jzUE
4C7rcGoKn7sbZjOOhDLswbwITzjBvLOX/C4spStK4sJwYWzmc0pJYGDULHWkzKjf
kAq+omI1+OBb229CIdaN/o1bBr+3E66Ev9+ZhKwC4JehY9DeiWyH+J46y3bCOHWT
Zy7/MtrKBIbHiZh1Jwg76lblCvcfa+eHzMiDQyiposqcM4PHZvGqFI9C6XxJnkcs
g5Ff9iidWR8=
=kzHj
-----END PGP SIGNATURE-----

--02TgiDMAH4DLwn5E--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071124031628.GI43532>