Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2007 21:09:04 +0100
From:      Adam J Richardson <fatman@crackmonkey.us>
To:        Mayank Jain <mayank@in.niksun.com>, freebsd-questions@freebsd.org
Subject:   Re: su: not running setuid
Message-ID:  <471E54E0.5070200@crackmonkey.us>
In-Reply-To: <20071022202157.GF57955@hal.rescomp.berkeley.edu>
References:  <200710221851.48278.mayank@in.niksun.com> <20071022202157.GF57955@hal.rescomp.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Christopher Cowart wrote:
> 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. 

What about going to single user mode and editing /etc/passwd so the 
"root" line has the username "uname"? Or add user "uname" with UID 0?

Regards,
Adam J Richardson



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