Skip to main content

Change root password

Comments

4 comments

  • SysSachin
    You can change that with using " echo "USERNAME:NEWPASSWORD" | chpasswd " but can you please let me know why you want to change that with cron and every 12 hours ?
    0
  • 24x7server
    Hi, It is too risky to do it like this because you will have to pass the new password somewhere to view and doing this may be a bit risk in terms of security. You may end up losing the password too. However, if you want to do something security wise, I would suggest using an SSH key and disable the password authentication, so there will be no need to have the SSH password to be changed again and again.
    0
  • biggdogg285
    Thanks for your responses. I just want to randomly change the root password so that nobody can access it via WHM. We do use CSF for brute force attacks, but I would feel better if that root password wasn't stored anywhere. SSH is already locked down to a different port and will not accept password authentication. PermitRootLogin without-password PasswordAuthentication no Any idea how I can cleanly update the root password via the root cron?
    0
  • cPanelMichael
    Any idea how I can cleanly update the root password via the root cron?

    Hello, You can find discussion and examples on this topic at the following third-party URL: Change Password every week for root user script Thank you.
    0

Please sign in to leave a comment.