Ubuntu Change Password

29/12/2020
In terms of security, Linux is definitely one of the tightest. The password system is one of the most important parts. Without the password, you’re not able to access a secure system and do anything. If you allow system access without a password, it is not secure. No password, no nothing, in terms of security. However, you may also need to change your password at any point. Let’s have a look at changing the password of your system.

Changing the password

This is the password that you have to enter when you’re logging into your account. This password isn’t the “root” password. Let’s fire up a terminal and run the following command –

passwd

This will prompt you to enter your current password. Then, you have to type your new password 2 times.

Changing the “root” password

The “root” is the ultimate user account for any Linux system that offers the most control over the system, even allowing access to sensitive system files and other files. For changing the “root” password, run the following command –

sudo -s
passwd

# OR

sudo passwd

Then, restart your system.

Changing password without the current “root” access

In cases, you may not be able to access to your system because you forgot the “root” password. It’s also possible to change the password without having access to the system. Restart your system.

Keep holding “Shift” to access the GRUB menu.

Press “E” for editing the startup command.

Get to the line “linux /boot”.

At the end of “ro”, type the following text –

init=/bin/bash

Press “Ctrl + X” to boot with the modified startup command. Run the following commands –

mount -o remount,rw /
passwd

Enter your new password. After password changing is successful, run the following command for restarting your system –

reboot –f


Voila! Your password is changed successfully!

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Install DenyHosts on Ubuntu

Install and Configure DenyHosts on Ubuntu DenyHosts is a python script which allows or denies access to SSH server using...
28/12/2020

Install Magento 2 on Ubuntu

E-commerce websites provide a platform for buyers and sellers and make online business easier than before. Ecommerce site...
29/12/2020

Install Flash Player on Ubuntu

You all know that Adobe won’t be releasing any Flash Player anymore. The security patches for existing Flash Players will...
12/02/2020
Bài Viết

Bài Viết Mới Cập Nhật

Dịch Vụ Xây Dựng Hệ Thống Peering Với Internet Exchange (IXP)
04/04/2025

Dịch Vụ Triển Khai VPN Site-to-Site & Remote Access
04/04/2025

Dịch Vụ Thiết Lập Hệ Thống Tường Lửa (Firewall)
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ảo Hóa & Cloud
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ceph
04/04/2025