LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 06:50 PM   #1
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

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, 07: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 07:32 PM.
 
1 members found this post helpful.
Old 02-10-2016, 08:20 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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 08:25 PM.
 
Old 02-10-2016, 08:25 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,665

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, 08:49 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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, 12:43 PM   #6
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

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, 01: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, 09: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



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 07:07 AM
Xubuntu reset forgotten passwords knowland74 Linux - Newbie 1 02-25-2009 10:30 PM
Root & user logins : Passwords? Why not encryption keys instead? furfurdemon666 Linux - Security 4 07-02-2004 09:17 AM
Forgotten all passwords and logins! mobyuk Linux - Newbie 3 06-03-2004 05:17 AM
forgotten passwords anything Linux - General 3 03-18-2003 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:08 AM.

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
Open Source Consulting | Domain Registration