LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2016, 07:50 PM   #1
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 82

Rep: Reputation: Disabled
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.
 
Old 02-10-2016, 08:16 PM   #2
linuxteen
LQ Newbie
 
Registered: Feb 2016
Distribution: PclinuxOS 64bit && Crux linux 3.2 in a VM
Posts: 12

Rep: Reputation: Disabled
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

Last edited by linuxteen; 02-10-2016 at 08:32 PM.
 
1 members found this post helpful.
Old 02-10-2016, 09:20 PM   #3
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 2,063

Rep: Reputation: Disabled
Quote:
Originally Posted by arranskye View Post
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.

Using Ubuntu 13.04 and just trying to clean everything up on my PC to install the latest version of Ubuntu.

STEP by STEP details

Quote:
Unlock The Root Account, Reset The Root Password, Change Username In Ubuntu 13.04 Raring Ringtail

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 ....

Last edited by BW-userx; 02-10-2016 at 09:25 PM.
 
Old 02-10-2016, 09:25 PM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Something is fishy here, forgotten sudo password? There is no such thing, user password is used for sudo.
 
Old 02-10-2016, 09:49 PM   #5
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 2,063

Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Something is fishy here, forgotten sudo password? There is no such thing, user password is used for sudo.
I just set my sudo to nopasswd so no worries
 
Old 02-11-2016, 01:43 PM   #6
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 82

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-11-2016, 02:59 PM   #7
linuxteen
LQ Newbie
 
Registered: Feb 2016
Distribution: PclinuxOS 64bit && Crux linux 3.2 in a VM
Posts: 12

Rep: Reputation: Disabled
glad you have solved it.
 
Old 02-15-2016, 10:43 AM   #8
Blitzig
LQ Newbie
 
Registered: Feb 2016
Location: South Africa
Distribution: Fedora, RedHat, Centos7
Posts: 18

Rep: Reputation: 2
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
 
  


Reply

Tags
passwords


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I Have Forgotten the Root Password & Need To Change It balamuruganram Linux - General 3 07-02-2010 08:07 AM
Xubuntu reset forgotten passwords knowland74 Linux - Newbie 1 02-25-2009 11:30 PM
Root & user logins : Passwords? Why not encryption keys instead? furfurdemon666 Linux - Security 4 07-02-2004 10:17 AM
Forgotten all passwords and logins! mobyuk Linux - Newbie 3 06-03-2004 06:17 AM
forgotten passwords anything Linux - General 3 03-18-2003 03:23 PM


All times are GMT -5. The time now is 12:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration