Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2007 13:21:57 -0700
From:      Christopher Cowart <ccowart@rescomp.berkeley.edu>
To:        Mayank Jain <mayank@in.niksun.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: su: not running setuid
Message-ID:  <20071022202157.GF57955@hal.rescomp.berkeley.edu>
In-Reply-To: <200710221851.48278.mayank@in.niksun.com>
References:  <200710221851.48278.mayank@in.niksun.com>

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

--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--



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