su: not running setuid

Christopher Cowart ccowart at rescomp.berkeley.edu
Mon Oct 22 13:22:06 PDT 2007


On Mon, Oct 22, 2007 at 06:51:48PM +0000, Mayank Jain wrote:
> Hi all,
> 
> I have run chown -R uname:wheel . as root in the / directory. Now it is not 
> allowing me to log in as su.
> Giving the following error
> 
> su
> su: not running setuid
> 
> I have also tried su -l but still same error. Can any body suggest me some 
> solution to this problem.
> 
> uname -a
> FreeBSD mayankjain.in.niksun.com 6.2-RC1-p1 FreeBSD 6.2-RC1-p1 #0: Mon Dec  4 
> 09:56:16 UTC 2006     
> root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/SMP  i386
> 
> 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. 

Good luck...

-- 
Chris Cowart
Lead Systems Administrator
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 825 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20071022/5373d745/attachment.pgp


More information about the freebsd-questions mailing list