How to change password on Ubuntu 18.04 Bionic Beaver Linux

Objective

The objective is to change a user password on Ubuntu 18.04 Bionic Beaver Linux

Operating System and Software Versions

  • Operating System: – Ubuntu 18.04 Bionic Beaver Linux

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

Difficulty

EASY

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user

Instructions

Change password using Command Line

In the first example we will be changing password for the currently logged in user linuxconfig using the passwd command. No special privileges are required.

Executing the passwd command with no additional options or arguments will change the password for the current logged in user. Open up terminal and enter:

$ passwd

Please note that you will be prompted to enter your current password first after which you will be required to enter and retype your new password. You will not be able to see the password you are typing on the terminal. However, the terminal is reading your keyboard input regardless, so just keep typing.

Using the next example we will change the password for a different user called john. In this case we need to use the sudo command and specify the user’s name for whom we wish to change the password:

$ sudo passwd john


After executing the above passwd command you will be first asked to enter your current administrative sudo password, followed by the new user password.

Change user password on Ubuntu 18.04 Bionic Beaver from command line

Change user password on Ubuntu 18.04 Bionic Beaver from command line.

Change password from graphical user interface

change user password from the default Ubuntu 18.04 graphical interface

To change a user password from the default GNOME Ubuntu 18.04 graphical interface, navigate to Settings->Details->Users. Click on the Password box and enter the current and new user passwords.