Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Root password change in WHM has no effect in cmd-line login

Discussion in 'Security' started by gentlemedia, Jul 15, 2017.

  1. gentlemedia

    gentlemedia Member

    Joined:
    Jul 15, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Hi,

    I have a rather strange issue.
    I've changed my root password in WHM, because I still used the password that my provider created when I purchased my VPS.
    I can login with my new password in WHM, but as I want to login with su root in the cmd-line with my new root password, I get the message su: Authentication failure.

    Now here's the weird thing, I can login as su root with my old root password (the one that I got from my provider).

    Do I also need to change the old root password with the new one in CentOS 7 which is the OS on the server too?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. gentlemedia

    gentlemedia Member

    Joined:
    Jul 15, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    I just noticed that I also couldn't login with my new root password in WHM, so I tried it with my old password and I could login. What's going on here? :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    42
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Might be there is browser cache issue or password not changed yet.

    Try to access WHM after clearing browser cache. If still facing same problem then change password again.
    Log into WHM >> Home >> Server Configuration >> Change Root Password
    1. Enter your new root password (twice) and select "Change Password."
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. gentlemedia

    gentlemedia Member

    Joined:
    Jul 15, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Thanks, that did the trick! I've created a new password in WHM again and cleared the browser cache in particular 'Passwords'. Now I can use in WHM and as su root my new root password.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. gentlemedia

    gentlemedia Member

    Joined:
    Jul 15, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Uhm... I thought this was solved by clearing the cache, but unfortunately it isn't.

    Again I can't login anymore with my new root password both in WHM and as su root. For some reason it reverts back to my old root password with which I now have to login. I'm baffled by this!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #5 gentlemedia, Jul 16, 2017
    Last edited: Jul 16, 2017
  6. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    721
    Likes Received:
    245
    Trophy Points:
    93
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I don't know if this is going to help......

    • I am told that some virtual servers don't allow root password changes - if you are on a virtual server - you may want to consult with your server provider.
    • Examine your /etc/passwd and /etc/shadow for duplicated root entries - I believe that there should only be one root entry in each file - if you have more, that may be causing your issue, but I don't want to advise you on how to fix it o_O
    • Check to see that any SElinux features have not inadvertently been re-enabled - I believe that SElinux is fundamentally incompatible with cPanel, although some tech sites do claim that it can be re-enabled after WHM/cPanel has been installed.

    This explanation of the Understanding /etc/shadow file might be useful

    Hope something helps :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 rpvw, Jul 16, 2017
    Last edited: Jul 16, 2017
  7. gentlemedia

    gentlemedia Member

    Joined:
    Jul 15, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Thanks, rpvw.

    I will ask the provider re your first point, but I'm almost certain this is not the case. I remember they even said at one point that I could/should change the root password.
    Re your second point, how do I access these paths... sorry, but working with cmd-line is not something that I do often.
    Re SElinus this I had to disable already according to the server requirements the CS-Cart CMS recommends me, so that's done. I'm configuring the VPS for the CS-Cart Multi-vendor software

    EDIT: Sorry, I see the link now you've posted about /etc/shadow
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,320
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @gentlemedia,

    Let us know once you hear back from your provider.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. gentlemedia

    gentlemedia Member

    Joined:
    Jul 15, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Hi @cPanelMichael

    They're looking into this and they'll get back to me tomorrow. They said I can change the root password directly in CentOS 7, but they're looking into the issue via WHM. iI they're blocking this for some reason or not.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. gentlemedia

    gentlemedia Member

    Joined:
    Jul 15, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    To me this seems to be a provider issue, but they said they don't set restrictions for changing the root password.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    721
    Likes Received:
    245
    Trophy Points:
    93
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I don't know if any of the following might be relevant or helpful, but I found it on the transIP provider FAQ (which is who you indicated that you have your VM with)
    And for Centos7 VMs

    Single User Mode: Reset / Recovering Forgotten Root User Account Password in RHEL / CentOS 7
    Hope this helps :) (The whole thing seems unnecessarily over-complicated to me - I am so happy I don't run any virtual servers)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #11 rpvw, Jul 20, 2017
    Last edited: Jul 20, 2017
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice