How to reset password for Linux User Account (user Root account unlocked or enabled) - Ubuntu

Опубликовано: 20 Октябрь 2024
на канале: Diyar Hussein
43
0

How to reset the password for the User Account in Linux with the Root account enabled:

00:10 Insert Live CD/USB for Ubuntu OS
00:14 Change the booting to the CD/USB from the BIOS:
00:24 Run Live Ubuntu
00:37 Open Terminal

00:41 Run the command lsblk to check the list of partitions in Storage:
lsblk | grep -v "loop"

00:59 Mount the partitions and bind root directories:
sudo mount /dev/sda3 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /run /mnt/run

02:09 Change the root directory in the terminal:
sudo chroot /mnt

02: 22 Check the list of the users in OS:
list /home

02:26 Change the password of a user with the command Passwd:
passwd (USER ACCOUNT)

02:34 Reboot the machine and boot to the OS.