Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Forgetting your password can be a frustrating experience, especially when it locks you out of your own system. In a Linux environment, resetting a forgotten password is a crucial skill that can save you time and effort. This article will guide you through the process of resetting a forgotten password in Linux, ensuring you can regain access to your system without having to reinstall the operating system.
Examples:
1. Using Single-User Mode (for most Linux distributions):
Shift
key (for BIOS systems) or the Esc
key (for UEFI systems).e
to edit the boot parameters.linux
and append single
or init=/bin/bash
at the end of this line.Ctrl + X
or F10
to boot with the modified parameters. This will boot the system into single-user mode or a root shell.passwd
command. For example: passwd username
Replace username
with the actual username whose password you want to reset. Follow the prompts to enter and confirm the new password.
reboot
2. Using a Live CD/USB:
fdisk -l
or lsblk
command. For example: lsblk
/dev/sda1
, the command would be: sudo mount /dev/sda1 /mnt
sudo chroot /mnt
passwd
command: passwd username
Replace username
with the actual username.
exit
sudo umount /mnt
sudo reboot