Categories
linux Password

How to reset your linux password

This is a generic how to, working for all Linux distributions, not only for Ubuntu or Debian or Centos etc etc.

I see a lot of howto’s what are based on the same “story”: boot in “single mode” and type passwd to change the password, but are some systems like Debian and probably others what doesn’t let you get in single mode if you don’t know the root password … so the single mode solution it will not work.

First I will describe you the single mode solution, because the start of this solution is very similar with the next solution what I will present you in the end.

    How To change the root password in single mode

  1. Restart the machine.
  2. Press any key while GRUB menu is loading.
  3. You will see the Grub Menu with you configured kernels.
  4. Choose a good kernel (or the options what is starting your linux) and press e to edit it.
  5. Now choose the line that begins with ‘kernel’. Press ‘e’ again to edit this line.
  6. Now at the end of the line just add: single
  7. Press Enter and after that press b to boot that kernel

After that the kernel will start loading and if you have lucky and your installation doesn’t have password on “single mode” you will can change the root password with passwd utility. If you have the luck to have a password on the single mode just follow the next steps:

    Other way to change the linux root password

  1. Follow the same steps as “single mode solution” but only until step 6.
  2. Replace the step 6 with: Now at the end of the line just add: init=/bin/sh
  3. Press Enter and after that press b to boot that kernel
  4. Kernel will boot and it will stop in a shell
  5. In this shell type: mount -o remount,rw /
  6. Now type: passwd and change the password
  7. Now type: sync to syncing disk (flush from memory to HDD).
  8. After that remount the disk read only: mount -o remount,ro and reboot / Or Ctrl+Alt+Printscr+S, Ctrl+Alt+Printscr+U, Ctrl+Alt+Printscr+B if you have Magic Sysrq keys enable:)

What are MagicSysRq keys ?

These are some keys combination’s what will let you to access some kernel basic commands at low level. The combination’s what I give you above are for:

Ctrl+Alt+Printscr+S – sync the disk
Ctrl+Alt+Printscr+U – unmount the disk
Ctrl+Alt+Printscr+B – reboot

'Coz sharing is caring
Categories
Microsoft Password

Change XP Password With Install CD

If you forgot your Windows login password which contains your most valuable data with your all favorite setting and you fear about losing all the data and settings? Then you don’t worry about this problem, if unfortunately you have this problem. Here is the best method to restore your Windows login password provided if you have the Windows installation CD.

  1. Place your Windows XP CD in your cd-rom and start your computer (it’s assumed here that your XP CD is bootable – as it should be – and that you have your bios set to boot from CD)
  2. Keep your eye on the screen messages for booting to your cd Typically, it will be “Press any key to boot from cd”

  3. Once you get in, the first screen will indicate that Setup is inspecting your system and loading files.
  4. When you get to the Welcome to Setup screen, press ENTER to Setup Windows now
  5. The Licensing Agreement comes next – Press F8 to accept it.
  6. The next screen is the Setup screen which gives you the option to do a Repair.

    It should read something like “If one of the following Windows XP installations is damaged, Setup can try to repair it”
    Use the up and down arrow keys to select your XP installation (if you only have one, it should already be selected) and press R to begin the Repair process.

  7. Let the Repair run. Setup will now check your disks and then start copying files which can take several minutes.
  8. Shortly after the Copying Files stage, you will be required to reboot. (this will happen automatically – you will see a progress bar stating “Your computer will reboot in 15 seconds”
  9. During the reboot, do not make the mistake of “pressing any key” to boot from the CD again! Setup will resume automatically with the standard billboard screens and you will notice Installing Windows is highlighted.
  10. Keep your eye on the lower left hand side of the screen and when you see the Installing Devices progress bar, press SHIFT + F10. This is the security hole! A command console will now open up giving you the potential for wide access to your system.
  11. At the prompt, type NUSRMGR.CPL and press Enter. Voila! You have just gained graphical access to your User Accounts in the Control Panel.
  12. Now simply pick the account you need to change and remove or change your password as you prefer. If you want to log on without having to enter your new password, you can type control userpasswords2 at the prompt and choose to log on without being asked for password. After you’ve made your changes close the windows, exit the command box and continue on with the Repair (have your Product key handy).
  13. Once the Repair is done, you will be able to log on with your new password (or without a password if you chose not to use one or if you chose not to be asked for a password). Your programs and personalized settings should remain intact.
'Coz sharing is caring