Skip to main content

Su not working for me, locked out of root

Comments

6 comments

  • quizknows
    Do you happen to have CSF installed? You could use the "watch system logs" feature to watch /var/log/secure while you try to auth to root. The su binary should be root/wheel on a cPanel system, but it also needs to be chmod 4750. The 4 in front of 750 is important so that it's suid when it executes. If you're even able to run the 'su' command at all, the user is in the wheel group, so that's probably not your issue. last but not least check cphulk... it can lock you out of root on your own system if someone else is brute forcing you at the moment.
    0
  • angelleye
    Do you happen to have CSF installed? You could use the "watch system logs" feature to watch /var/log/secure while you try to auth to root. The su binary should be root/wheel on a cPanel system, but it also needs to be chmod 4750. The 4 in front of 750 is important so that it's suid when it executes. If you're even able to run the 'su' command at all, the user is in the wheel group, so that's probably not your issue. last but not least check cphulk... it can lock you out of root on your own system if someone else is brute forcing you at the moment.

    Thanks for the response. I was reading about that and I was planning on installing it, but I haven't gotten there yet because this whole thing happened before I was able to play with that. I have a little bit more info here. Going through the WHM Security Advisor it told me to set the users to have jailed shells, so I had done that. I found through Google somewhere that su root will not work with jailed shell accounts, and that's what was causing the username to be returned as incorrect. So now I'm back in again with the "normal shell", and now when I run su root (or su - root) I get this error. su: cannot set user id: Resource temporarily unavailable.
    0
  • cPanelMichael
    su: cannot set user id: Resource temporarily unavailable.

    Hello, Is "WHM Home " Security Center " Shell Fork Bomb Protection" enabled on this system? If so, does the issue continue when it's disabled? Thank you.
    0
  • angelleye
    Hello, Is "WHM Home " Security Center " Shell Fork Bomb Protection" enabled on this system? If so, does the issue continue when it's disabled? Thank you.

    Yes, it was enabled, and yes, disabling it seems to resolve my issue! Thanks! I'm a little worried, though, because the WHM info in here tells me I should leave this enabled. How am I supposed to fully secure this thing of the security measures conflict with each other?
    0
  • cPanelMichael
    Hello, It's a useful security feature, but it's not required. You are welcome to implement custom limits as referenced in this thread if the default limits are restricting users too much:
    0
  • angelleye
    Hello, It's a useful security feature, but it's not required. You are welcome to implement custom limits as referenced in this thread if the default limits are restricting users too much:
    0

Please sign in to leave a comment.