Forgotten Sudo & Root Passwords
Sorry, I know there are several posts in general and in various forums relating to re-setting forgotten passwords. I have re-set passwords myself and kept written instructions to use but this time nothing appears to work.
Grub/recovery/root For example a user named sally ls /home passwd sally produces "Give root PW for maintenance or type Control D to continue. Typed in Control D pressed enter and the command was just repeated. Nowhere to try mount -rw -o remount / no point in being asked for the Root PW when that plus the sudo pw is what I have forgottten. Please help. Thanks. its a couple of years since I have used the grub menu and that has also changed. I tried grub.edit to mount/remount but that did not work. Also tried grub/recovery/edit with the intention of appending the linux line with rw init=/bin/bash at the end. press Ctrl + X to boot Type in passwd username to set password. I could not do this because the print on the Edit screen was too small and blurred to find the Linux line. Using Ubuntu 13.04 and just trying to clean everything up on my PC to install the latest version of Ubuntu. |
Have to tried the chroot method? That's where you use a linux liveDVD andd then mount the root partition of your distro. You will then run:
mkdir /mnt/root mount /dev/sdXX /mnt/root # your_ubuntu_root_partition chroot /mnt/root then run: passwd exit reboot |
Quote:
STEP by STEP details Quote:
the sudo password should be the root passwd, but with these crazy distros that veaar away from a (old school) Linux that uses root as a user too well .... |
Something is fishy here, forgotten sudo password? There is no such thing, user password is used for sudo.
|
Quote:
|
Thank you for your replies. I call my username sudo because I always think of it as the sudo password as the terminal asks for sudo password. Nothing fishy It distinguishes it more easily in my mind from the root PW.
Managed to sort it so will put it here in case it helps others. grub e to edit arrow down and type single after ro on the line that starts linux /boot/vmlinuz. F10 to boot dropped into a root prompt. Type passwd username worked fine. Thank you are again. |
glad you have solved it.
|
Hi,
You can try the below and see if it works. > Boot and in GRUB highlight the kernel you wish to boot and press "e" to edit the kernel. > Look for the string "rhgb quiet" > Change the string to "init=/bin/bash" > Press Ctrl+x to boot into the system with runlevel 1 > Mount root as RW $mount -o remount,rw / $passwd root This will prompt to enter a new password for root. or $passwd user_name This will prompt to enter a new password for the specified user $touch /.autorelabel $exec /sbin/init This command will reboot the system |
All times are GMT -5. The time now is 02:51 PM. |