How to change user password in Ubuntu 18.04, 22.04, 24.04, 25.04 and 26.04
Read - 3 мин.
The article has been read - 105 раз
Updated - 12.06.2026
Published - 12.06.2026

How to change user password in Ubuntu 18.04, 22.04, 24.04, 25.04 and 26.04

Password polzovatelya yavlyaetsya odnim iz osnovnykh elementov bezopasnosti servera ili rabochey stantsii pod upravleniem Ubuntu. The regular password change helps to protect the system from unsanctioned access and increase the security level of the account.

In this instruction, I will show you how to change the password of the user in Ubuntu through the terminal. Follower version of the method:

  • Ubuntu 18.04 LTS
  • Ubuntu 22.04 LTS
  • Ubuntu 24.04 LTS
  • Ubuntu 25.04
  • Ubuntu 26.04 LTS

Podklyuchenie k serveru

Esli vy ispolzuete udalennyy server, snachala podklyuchites k nemu po SSH:

ssh username@server-ip

Where:

  • username — username;
  • server-ip — IP address of your server.

Primer:

ssh root@192.168.1.10

Kak izmenit password tekushchego user

To change the password of the current user, complete the command:

passwd

Sistema posledovatelno prozit:

Current password:
New password:
Retype new password:

Enter:

  • Password.
  • New password.
  • Povtorite new password for authentication.
  • After the successful change, a message will appear:

    passwd: password updated successfully
    Important: when you enter the password, the symbols in the terminal are not autobrajayutsya. This is the standard security function of Linux.

    How to change the password to another user

    Esli u vas est prava administratora (sudo), vy mojete izmenit password lyubogo polzovatelya na servere.

    Use the command:

    sudo passwd username

    For example:

    sudo passwd airnet

    After completing the command, you need to enter a new password:

    New password:
    Retype new password:

    After a successful change, the system displays:

    passwd: password updated successfully

    Trebovaniya k nadejnomu parolyu

    Dlya obespecheniya bezopasnosti rekomenduetsya ispolzovat slojnye password:

    • Minimum 12 characters;
    • Zaglavnye i strochnye bukvy;
    • Tsifry;
    • Special symbols;
    • Otsutstvie prostix slov i dat rojdeniya.

    Primary password:

    Airnet#2026Secure!Linux

    Ne rekomenduetsya ispolzovat:

    123456
    password
    qwerty
    admin123

    Check successful password change

    After changing the password, it is recommended to open the new SSH connection and verify that the login is complete with the new password.

    Eto pozvolit proverit korektnost izmeneniy do zavershenia tekushchey sessii.


    Vozmozhnye oshibki

    BAD PASSWORD

    Soobshchenie mojet poyavitsya pri ispolzovanii slishkom prostogo parolya:

    BAD PASSWORD: The password is too short

    And in this case, it is recommended to choose a more suitable combination of symbols.

    Authentication token manipulation error

    Ashibka mojet voznikat pri otsutstvii neokhodimyx prav dostupa ili pvorejdenii filev authentication.

    To change the password, use sudo or root.


    Zaklyuchenie

    Change the password in Ubuntu vypolnyaetsya all the same command:

    passwd

    To change the password of another user:

    sudo passwd username

    Regular password change helps increase the security of the server and protects the system from unsanctioned access.


    Zakazat VPS/VDS with Ubuntu

    Na serverax AIRNET dostupny vse actualnye version Ubuntu:

    • Ubuntu 18.04 LTS
    • Ubuntu 22.04 LTS
    • Ubuntu 24.04 LTS
    • Ubuntu 25.04
    • Ubuntu 26.04 LTS

    You can order a VPS/VDS server with pre-installed Ubuntu and get full root access for system management.

    Pereyti k vyboru VPS/VDS servera →

    Answers to popular questions

    How soon can I start using the service?

    The user account is opened immediately upon application.

    You can start using the service immediately after payment.

    Author of the article:

    user

    Editor-in-Chief

    Danaev Almaz