How to Use the Command Line to Reset User Passwords

November 9, 2022 / How-to Guide

This tutorial will illustrate how to use the command line to reset user passwords. There may be situations when you need to change the password via SSH.

Note: Changing a user’s password is typically preferable to be done using the cPanel interface since it helps you create a strong password or generate one that complies with the strength criteria.

Follow the procedure:

  1. Using the command line, you can update the user’s passwords by using the “passwd” command and simply specifying the user whose password you want to change.
    passwd $USER
  2. When you change a user’s password, the passwords for any associated services, including MySQL, FTP, Mail, PostgreSQL, and System, are also updated.
  3. Let us take an example:
    [root@the ~]$ passwd cpuser
    Changing password for the user “cpuser” …
    Changing password for “cpuser”.
    New UNIX password:
    Retype new UNIX password:
    passwd: The system has successfully updated all authentication tokens.
    The system has updated the passwords for the following services: MySQL, ftp, mail, postgresql, system

This way the passwords can be reset using the command line. For more information regularly visit our KB section. It will help you a lot. Also, you can contact our support team for any issues.

Spread the love