Skip to main content

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

Comments

10 comments

  • gentlemedia
    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? :)
    0
  • SysSachin
    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
      ]
    • Enter your new root password (twice) and select "Change Password."
    0
  • gentlemedia
    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.
    0
  • gentlemedia
    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!
    0
  • rpvw
    I don't know if this is going to help...... [LIST]
  • 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 :)
  • 0
  • gentlemedia
    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
    0
  • cPanelMichael
    Hello @gentlemedia, Let us know once you hear back from your provider. Thanks!
    0
  • gentlemedia
    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.
    0
  • gentlemedia
    To me this seems to be a provider issue, but they said they don't set restrictions for changing the root password.
    0
  • rpvw
    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) Frequently Asked Questions I want to reset my root password If you unexpectedly lost your VPS root password and your VPS uses GRUB (virtually all Linux distributions do this), you can create a new root password using the steps below.
      ]
    • Open the console (' BladeVPS ') in the control panel and restart the VPS using the ' Reset ' button.
    • Keep the console open and immediately after the restart, a message appears to press any key (such as ESC ) to open the GRUB menu. Pay attention! This menu is visible for up to 2 seconds, and you will have to press a number of times to prevent the OS from being booted.
    • Select the kernel (top is the last kernel and probably the one you use).
    • Press " a ".
    • Now type behind the line (space) single and press ENTER.
    • The OS is now launched in single-user mode as root.
    • Type passwd here, press enter and enter your new root password followed by an ENTER (twice).
    • Reboot the OS and then you will need to login with the new password.
    Important information! [LIST]
  • Ubuntu users: For Ubuntu, the actions are just something else; Detailed actions for this can be found on howtogeek.com/howto/linux/reset-your-forgotten-ubuntu-password-in-2-minutes-or-less/ Howtogeek .
  • Unfortunately for Ubuntu, the boot cycle is so fast that you sometimes miss the GRUB menu. You can optionally extend the time that the GRUB menu is visible by increasing the value of GRUB_TIMEOUT = x in / etc / default / grub . This can, for example, also be via the rescue mode. Via sudo update grub you can save the changes.
  • CentOS 7 users: In all derivatives of Red Hat Enterprise 7, including CentOS 7, single-user / rescue mode always requires the root password. As a consequence, the above steps will no longer work. There is another way to reset the root password, however, it is a bit more complex. You can find the steps on tecmint.com/reset-forgotten-root-password-in-centos-7-rhel-7/ tecmint .
    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)
  • 0

Please sign in to leave a comment.