From owner-freebsd-questions@FreeBSD.ORG Mon Oct 22 20:22:06 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B414116A46D for ; Mon, 22 Oct 2007 20:22:06 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 8F24813C494 for ; Mon, 22 Oct 2007 20:22:06 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 8210F3C048D; Mon, 22 Oct 2007 13:21:57 -0700 (PDT) Date: Mon, 22 Oct 2007 13:21:57 -0700 From: Christopher Cowart To: Mayank Jain Message-ID: <20071022202157.GF57955@hal.rescomp.berkeley.edu> Mail-Followup-To: Mayank Jain , freebsd-questions@freebsd.org References: <200710221851.48278.mayank@in.niksun.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p8PhoBjPxaQXD0vg" Content-Disposition: inline In-Reply-To: <200710221851.48278.mayank@in.niksun.com> Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-questions@freebsd.org Subject: Re: su: not running setuid X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2007 20:22:06 -0000 --p8PhoBjPxaQXD0vg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 22, 2007 at 06:51:48PM +0000, Mayank Jain wrote: > Hi all, >=20 > I have run chown -R uname:wheel . as root in the / directory. Now it is n= ot=20 > allowing me to log in as su. > Giving the following error >=20 > su > su: not running setuid >=20 > I have also tried su -l but still same error. Can any body suggest me som= e=20 > solution to this problem. >=20 > uname -a > FreeBSD mayankjain.in.niksun.com 6.2-RC1-p1 FreeBSD 6.2-RC1-p1 #0: Mon De= c 4=20 > 09:56:16 UTC 2006 =20 > root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/SMP i386 >=20 > I have also tried following but it didn't allow me to do so. > chown root:wheel /usr/bin/su > chown: /usr/bin/su: Operation not permitted Unless you can find some local privilege escalation exploit, I'm thinking you're stuck. You can probably fix it in single-user mode: * Reboot * Pick single user mode from the boot menu * Accept the default shell $ fsck -p $ mount -u / $ mount -a -t ufs $ chown root /usr/bin/su But if the command above ran to completion, you probably have a mess of permissions on your filesystem. You may want to look into rebuilding / reinstalling world while you're in single.=20 Good luck... --=20 Chris Cowart Lead Systems Administrator Network & Infrastructure Services, RSSP-IT UC Berkeley --p8PhoBjPxaQXD0vg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iQIVAwUBRx0GZSPHEDszU3zYAQIt3Q/9HyacP7+O00I0q5TSCO7fKG0Lwh/BeiT+ OIZIJBRB0cI79EWJA8oYgtBNO+9gxWw6g5nadnPGriQ+9D/JK0DPVKH/iahgZR0t S5q6adbUEKP5zlXHvV+C3LN4rXSD1HiKKZbFqXTYciwhQXLjmW3fSSY6jmqKkfUg stVZVWspof4BncMvqpiRQdqy6yjBEftXk6rleoCgSsuo5MrA5/MgdelMe3a85cdh xcEPctsSiXYHgpx8jJN5GnCYBKQGL0ZgyUcCTo07y4oK+Rq292+dPaR4gsC61euD jUba3ridWafQ8QJGFyEx2Iwfbym6yuOO8EmEbu3jXm9BswITEdpn6glczOrKcHA9 e0q8z8x2+HjKzeQWiirV5BOESji8F2+vjwgZ0GGBuc1ru2p0UF/PvZ/9pBDLa1hz hsfJAi9oIqnd6iIvli9emRR2kuQwMBsRTeWkOR/ksBRSiNVBFwAU1x5kBOmWE+OG X35gJt0gFh/5zKjdBnzZe+EQ1NE9AI13mhLGvCx7qmL0b6mxze5txYB1Z5Ns2uiA 14IIwR9yx/ua9VhlAManvJJcrRYI0TZizFyQpMLHd9w8cX04J/cZSzjTGdDY5/9f Cv10EWMKy79/U+WhWVAUelcz/t26MP24O6CqZ/AmitdmJ4BxJolDmEoqA6JZYTaQ A/hKlIQ63mE= =bSUg -----END PGP SIGNATURE----- --p8PhoBjPxaQXD0vg--