-
![](https://m.primal.net/Hpai.webp)
@ DrStacker
2024-08-30 00:55:19
### Changing Passwords in Linux Using GRUB
1. **Access the GRUB Menu**: Reboot your system and hold down the **Shift** (BIOS) or press the **Esc** (UEFI) key to access the GRUB menu.
2. **Edit the GRUB Entry**: Highlight the Linux entry and press **'e'** to edit.
3. **Modify Boot Parameters**: Find the `linux` or `linux16` line and add `single` or `init=/bin/bash` at the end. Press **Ctrl + X** or **F10** to boot.
4. **Remount the Filesystem**: If booted into a bash shell, run `mount -o remount,rw /` to remount the filesystem as read-write.
5. **Change the Password**: To change the root password, run `passwd`. For a user, run `passwd username`.
6. **Reboot the System**: After changing the passwords, reboot the system by running `exec /sbin/init` or `reboot`.
7. **Log In**: Log in with the new root or user password.
originally posted at https://stacker.news/items/666211