Home Learn Linux Linux Answers High Performance Do not remember the pass word on the computer so nunable to change. What can I do?
  • Contact your computer administrator to have your password reset.

    If this is for your home computer I then we will need to know what distro/operating system you are using to help you.

    Answered by mfillpot
    5 years ago
    1 0
  • You should be able to log into Root as long as you know the password for the SU which will give you the option to change passwords for users on your system. As the other person suggested, please provide Distro/OS info.

    Answered by Tony.Ricena
    5 years ago
    0 0
  • Here's a generic answer valid for each distro around.
    Start your PC with a livecd distro, everything carrying a text editor is fine. Now from command line or XWindow start a terminal.
    If you don't know the name of your root partition you need to discover it, type: "fdisk -l" to list all available partitions (mounted or not) in your system, than try to locate your root partition (should be somethin like /dev/sda2 /dev/hda2 or something like that)
    now mount your root partition in your current live tree, assuming you've discovered /dev/hda2 as your root: mount /dev/hda2 /mnt. Please note your /mnt should exist before this operation or create a new different dir (example /tmp/myrootdisk); if you've a readonly file system try to create a dir into /tmp, it works most of the times.

    Now edit your shadow file where password resides, assuming you've mounted your root disk into /mnt you'll have the file in /mnt/etc/shadow
    Inside it you'll have lines like:
    now with your favorite editor (vi, nano, mcedit, ...) delete the string between first and second ":" for the user you want to modify so after your edit it will look like:
    and save the file when finished
    If your system allows you to log in as root you only need to change the line where the root user is reported, if you've something like ubuntu configured for denying root user login you need to edit even your common account (if you don't remember that password too of course). Than you're set.
    Take off the live cd and reboot the machine, now when trying to access common user or root you've an empty passwd.

    This method works if
    - You're using shadow passwords, if you're using traditional passwords based on /etc/passwd you need to edit that file
    - You're not using an encrypted file system. If you've encrypted root filesystem when you've installed your linux distro you need to remember a password to access it or the root partition is totally scrambled and you're in serious troubles (encryption is made for this)

    If you're still reading this long post if you need more info please let me know


    Answered by ben
    5 years ago
    0 0
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category High Performance

Upcoming Linux Foundation Courses

  1. LFS520 Essentials of OpenStack Administration
    07 Dec » 10 Dec - N. Reading + Virtual
  2. LFS426 Linux Performance Tuning
    07 Dec » 10 Dec - Virtual
  3. LFS416 Linux Security
    07 Dec » 10 Dec - Virtual

View All Upcoming Courses

Community Answers - Search

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board