How to reset kali linux password while booting

To reset the Kali Linux password while booting, you can follow these steps to access the root shell and change the password:


1. **Reboot Your System:**

   Start by rebooting your system.


2. **Access GRUB Menu:**

   When the GRUB menu appears (usually you need to press `Esc` or `Shift` key during boot to see it if it doesn't appear automatically), select the Kali Linux option and press `e` to edit the boot parameters.


3. **Edit GRUB Boot Parameters:**

   Find the line that starts with `linux`. At the end of this line, add the following text:


   ```bash

   init=/bin/bash

   ```


   This will make your system boot into a bash shell.


4. **Boot into Single User Mode:**

   Press `Ctrl+X` or `F10` to boot with these parameters. Your system will boot into a single-user mode with a root shell.


5. **Remount the File System:**

   Remount the file system with write permissions by running:


   ```bash

   mount -o remount,rw /

   ```


6. **Reset the Password:**

   Use the `passwd` command to change the password for the user you need. For the root user, the command is:


   ```bash

   passwd

   ```


   Follow the prompts to enter and confirm the new password.


7. **Reboot the System:**

   After resetting the password, reboot the system normally by running:


   ```bash

   exec /sbin/init

   ```


   Alternatively, you can use:


   ```bash

   reboot

   ```


Your system should now boot normally, and you can log in with the new password you set.


If you encounter any issues or have questions about specific steps, feel free to ask for further assistance.

Comments