su: not running setuid

Adam J Richardson fatman at
Tue Oct 23 13:12:36 PDT 2007

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?

Adam J Richardson

More information about the freebsd-questions mailing list