1

If I try to "su root" with an incorrect password, I get the expected 'authentication failure'.

If I try to with the correct password, I get 'setgid: Operation not permitted"

I have tried the usual 'boot via grub to reset the root password, but then I get 'bash: cannot set terminal process group (-1): Inappropriate ioctl for device' and need to power cycle for the keyboard even to be recognized.

I do not have sudo installed. I have not made any administrative changes to this machine in months, it was working as expected, and now suddenly is not.

This machine dual boots with Windows, and the root correct password does allow me to access the shared Windows hard drive. ("Authentication required to mount...blah blah..")

edit: ls -l $(which su) shows

-rwxr-xr-x 1 myname myname 40168 Nov 20 2014 /bin/su

SOLVED:

Eventually I determined that I could not su to any user, not only to root.

Booted from a live CD

mount /dev/sda1 /mnt (sda1 in my case, maybe not yours)

chown -R root:root etc

chown -R root:root bin

..all the other directories that were accidentally mine, not root's

and most importantly, /bin/su needed to be -rwsr-xr-x

it was not just the ownership, but the 's', not 'x' for the owner that was tripping things up.

I suspect other issues will arise from incorrect ownership, but now that I can su to root I should be able to correct them.

  • 2
    Can you include the output of ls -l $(which su) – EightBitTony Feb 16 '16 at 15:58
  • Your edit doesn't show the whole output of ls -l $(which su), we need to check user and group... please add the whole output. – Jan Feb 16 '16 at 16:40
  • I have an elderly Ubuntu CD that I can try booting from to change permissions. Am I liable to run into issues due to this being a dual boot with Windows PC? I don't want to break that. – mickeyf Feb 16 '16 at 16:58
4

The issue lies within the permissions of your su binary, which need to be: -rwsr-xr-x 1 root root 35200 Mai 25 2012 /bin/su. (checked on Wheezy and Jessie).

This mostly happens when you acidentially change owner and group of your whole filesystem or a subfolder like bin.

To get su to work again, you can either aptitude reinstall login or boot from another medium and fix the permissions from there.

  • Remember that you need to be root though... – Jan Feb 16 '16 at 16:51
  • But I am not root, and apparently cannot become root. Catch 22. – mickeyf Feb 16 '16 at 16:52
  • I notice that I have ownership of /etc/passwd and /etc/group, but since the problem does not appear to be root's password, I don't think that helps me any. – mickeyf Feb 16 '16 at 16:54
  • 2
    That's why I wrote to boot from another medium and change permissions from there. – Jan Feb 16 '16 at 16:54
  • 3
    If you have ownership of /etc/passwd and other files, you most probably have messed up the permissions of you whole system. – Jan Feb 16 '16 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.