Showing posts with label jail. Show all posts
Showing posts with label jail. Show all posts

Thursday, November 13, 2008

SU Error - su: not running setuid If this error occures while you try to su, it means that you need to set SUID bit to su binary like below: $ su -

SU Error - su: not running setuid

If this error occures while you try to su, it means that you need to set SUID bit to su binary like below:

$ su -
su: not running setuid

(BECOME ROOT SOMEHOW AND THEN...)

# ls -l `which su`
-r-xr-x--- 1 root wheel 14324 Apr 12 23:14 /usr/bin/su
# chmod u+s `which su`
# ls -l `which su`
-r-sr-x--- 1 root wheel - 14324 Apr 12 23:14 /usr/bin/su
# su - andrei
$ su -
Password:


So above commands do:

  1. ls -l `which su` - lists su binary
  2. chmod u+s `which su` - adds SUID bit to su binary
  3. exactly like 1.
  4. su to another user ( andrei in this case)
  5. su to root from a normal user. See that the error does not occure any more.

notes: instead of `which su` you could use directly /path/to/su/binary if you know it, and you can use `which su` and it'll work on both Linux & FreeBSD.

This error occured after a buildworld. I suspect that because of file flags I use.

Tuesday, November 4, 2008

Operation not permitted

mv: /usr/jail/camel/sbin: Directory not empty
mv: /usr/jail/camel/var/empty: Operation not permitted
mv: /usr/jail/camel/var: Directory not empty
mv: /usr/jail/camel: Directory not empty
mv: /usr/jail: Directory not empty
mv: /bin/rm /usr/jail: terminated with 1 (non-zero) status

I guess I ain't gotta worry about the sockets but what about the rest?

you need

chflags -R noschg yourdir