forgot root password

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
howardballinger
Level 1
Level 1
Posts: 3
Joined: Sat Jan 06, 2018 1:44 am

forgot root password

Post by howardballinger » Fri Jan 19, 2018 12:51 pm

I can't believe I did this! I need to enter my root password to get updates -- my user password doesn't work. I must have set it to something else and I don't remember what, It was only a couple of weeks ago, I'm a new user. Shame on me! I've researched the problem, it looks like I'll have to edit one of the grubs to reset it. How can I do this?

Here's my inxi system info ...

Code: Select all

System:    Host: shafee-Inspiron-15-5578 Kernel: 4.10.0-38-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.6.6 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18.3 Sylvia
Machine:   System: Dell (portable) product: Inspiron 15-5578
           Mobo: Dell model: 0395D5 v: A00
           Bios: Dell v: 1.6.1 date: 02/13/2017
CPU:       Dual core Intel Core i7-7500U (-HT-MCP-) cache: 4096 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11616
           clock speeds: max: 3500 MHz 1: 500 MHz 2: 499 MHz 3: 499 MHz
           4: 499 MHz
Graphics:  Card: Intel Device 5916 bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.06hz
           GLX Renderer: Mesa DRI Intel HD Graphics 620 (Kaby Lake GT2)
           GLX Version: 3.0 Mesa 17.2.4 Direct Rendering: Yes
Audio:     Card Intel Device 9d71 driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.10.0-38-generic
Network:   Card: Intel Wireless 3165 driver: iwlwifi bus-ID: 01:00.0
           IF: wlp1s0 state: up mac: <filter>
Drives:    HDD Total Size: 1000.2GB (3.5% used)
           ID-1: /dev/sda model: ST1000LM035 size: 1000.2GB
Partition: ID-1: / size: 363G used: 26G (8%) fs: ext4 dev: /dev/sda5
           ID-2: swap-1 size: 8.45GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 44.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 198 Uptime: 9:38 Memory: 1331.6/7850.8MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35 
Last edited by karlchen on Fri Jan 19, 2018 1:32 pm, edited 1 time in total.
Reason: Removing all the garbled escape codes from the inxi report. Thank you to my Swiss edito Notepad2.

User avatar
JerryF
Level 9
Level 9
Posts: 2767
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: forgot root password

Post by JerryF » Fri Jan 19, 2018 12:56 pm

howardballinger wrote:I can't believe I did this! I need to enter my root password to get updates -- my user password doesn't work. I must have set it to something else and I don't remember what, It was only a couple of weeks ago, I'm a new user. Shame on me! I've researched the problem, it looks like I'll have to edit one of the grubs to reset it. How can I do this?
...
My suggestion is to find out why you can't use your password to get updates. You really shouldn't be running as root to do that.

Check Users and Groups and see if your username is in the 'sudo' group.
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
Fred Barclay
Level 12
Level 12
Posts: 4144
Joined: Sat Sep 13, 2014 11:12 am
Location: Bumping around in the bush

Re: forgot root password

Post by Fred Barclay » Fri Jan 19, 2018 2:36 pm

Out of curiosity, did you change your user password after installing Mint?
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein

User avatar
austin.texas
Level 20
Level 20
Posts: 12055
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: forgot root password

Post by austin.texas » Fri Jan 19, 2018 2:39 pm

If you can't remember your user's password, you can set a new one.
Boot the computer and select your Mint OS in the Grub menu, but do not press ENTER - instead press e (for EDIT).
Arrow down to the line that starts with "linux"
It will look something like this: linux /boot/vmlinuz-3.16.0-38-generic root=UUID=b1bde976-50e2-4c32-a760-17b091b4202f ro quiet splash $vt_handoff
Go to the end of that line. Delete the words "quiet splash $vt_handoff" if that is there, and put: systemd.unit=multi-user.target
Then press F10 to boot. That will boot to a root shell.
Enter: passwd yourusername (whatever your user name is...)
Press Enter. It will request the new password (twice).
Note: when you type your new password, it will not display on the screen (for security reasons).
When complete, press Ctrl+Alt+Delete to reboot.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

Mute Ant
Level 13
Level 13
Posts: 4902
Joined: Tue Sep 03, 2013 7:45 pm

Re: forgot root password

Post by Mute Ant » Fri Jan 19, 2018 7:43 pm

"Linux Mint 18.3 Sylvia... I'm a new user." From the top then...

o Administrator actions are authorised using sudo and your normal log-in password. If you can't use Update Manager, it's not a problem with knowing or having a password for the root account. If the following command prints OKAY there's not a lot wrong...
sudo echo OKAY

o Freshly installed Sylvia doesn't have a root password. If you set one, that's your option, but forgetting it won't affect the normal operation of Mint. If your primary account sudo privilege is intact, you can delete-and-lock the root account password back to the default Mint state without knowing what it was...
sudo passwd -dl root

o If a user has an encrypted home folder, fiddling with their password using root-privileges is 'unwise'. You can change the log-in password, but that doesn't update the keyring. That user loses access to their encrypted data until the password is changed back. If any user 'forgets' the password for something encrypted, that data is lost beyond hope of recovery until the correct password is used, by remembering it, or by repeated guessing.
Data stored in an encrypted volume will only be accessible with the original password. Without this key, all the data will remain scrambled beyond hope of recovery.

howardballinger
Level 1
Level 1
Posts: 3
Joined: Sat Jan 06, 2018 1:44 am

Re: forgot root password

Post by howardballinger » Tue Jan 23, 2018 5:33 pm

Thanks to all, I'm just getting time to try some of those approaches today.
It's not about my user password, I know that. It's the root password.

And sudo commands fail -- the screen asks for my password, and doesn't accept my user password ... apparently what it needs is my root password, and the problem in the first place is to find out what my root pw actually is! screenshot attached.

The Update Manager when I hit "Install updates" says "Authentication as superuser is required to perform this action. Password for root : ___________". And Users and Groups says the same thing.

And Frank, I didn't change my user login once I set it up during install

I think I really do need to set a new root password somehow. How can I do that?

Thanks -- HB

User avatar
austin.texas
Level 20
Level 20
Posts: 12055
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: forgot root password

Post by austin.texas » Tue Jan 23, 2018 5:43 pm

What happens why you try MuteAnt's test?

Code: Select all

sudo echo OKAY
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

User avatar
JerryF
Level 9
Level 9
Posts: 2767
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: forgot root password

Post by JerryF » Tue Jan 23, 2018 6:54 pm

howardballinger wrote: ...
And sudo commands fail...

The Update Manager when I hit "Install updates" says "Authentication as superuser is required to perform this action. Password for root : ___________". And Users and Groups says the same thing.
I have a feeling that your user account is not in the sudo group.

Please run this command in Terminal:

Code: Select all

id
Copy and paste the results.
IF AND WHEN your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members.

User avatar
pbear
Level 5
Level 5
Posts: 564
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: forgot root password

Post by pbear » Wed Jan 24, 2018 6:56 pm

howardballinger wrote:I think I really do need to set a new root password somehow.
No, what you really need to do is determine whether you're in the sudo group and, if not, fix that. If you created a root password, what you should do is restore the default, which is not to have one. Mute Ant told you how to do this above. In Terminal, run sudo passwd -dl root.
Time flies like an arrow. Fruit flies like a banana.
Running Mate 18.3 64 bit (by upgrade from 18.1-2)

Post Reply

Return to “Installation & Boot”