Mot de passe UBUNTU perdu ou oublié

2 min read 3 hours ago
Published on Jan 18, 2025 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial provides a step-by-step guide to reset a forgotten or lost Ubuntu password. If you've found yourself locked out of your Ubuntu system, this process will help you regain access quickly and efficiently.

Step 1: Boot into Recovery Mode

  • Restart your computer.
  • Hold down the Shift key as the machine boots to access the GRUB menu.
  • Select the option labeled Advanced options for Ubuntu.
  • Choose the recovery mode version of your kernel (it usually has the word "recovery" in its name).

Step 2: Access the Root Shell

  • In the recovery menu, select Drop to root shell prompt.
  • This action will give you root access to your system.

Step 3: Remount the File System

  • To make the file system writable, enter the following command:
    mount -o remount,rw /
    
  • This command allows you to make changes to the system.

Step 4: Identify Your Username

  • If you are unsure of your username, list the home directories with:
    ls /home
    
  • Note down your username as you will need it for the next command.

Step 5: Reset Your Password

  • To reset your password, enter the following command, replacing your_username with your actual username:
    passwd your_username
    
  • You will be prompted to enter a new password and confirm it. Choose a strong password that you can remember.

Step 6: Restart Your Computer

  • After successfully changing your password, type exit to leave the root shell.
  • Select the option to resume normal boot from the recovery menu.

Conclusion

You have successfully reset your Ubuntu password. Remember to store your new password securely to avoid future lockouts. If you encounter any issues during this process, refer to the provided tutorial link for more detailed guidance.