Sudo password .Is it possible to retrieve ? Also hit the refreshing cache wall

Decided some time ago to give Linux a try so loaded UBUNTU 20.4 on to old Dell Latitude E6530 to learn.
Started well enough with most things working but hen took seriously ill and have not since had time to get back into it.

Recovering now so switched on again but immediately ran into 2 problems which I just can’t get past namely:
1When I try to use Terminal I get asked for sudo password and much to my disgust I can’t find or recall it.So far tried on line to solve this but failed can someone help as I feel I’ve hit the impenetrable wall.
2. Because of the lengthy time between my initial Ubuntu 20.4 foray and my reattempt to pick up where I left off I read that it was a good idea to restart by updating the software originally loaded . I got as far as having a list on screen of the programs apps I needed to update but half way through the process I lost my network connection and seemed to hit a second wall where I got a message to the effect that the cache was refreshing. Unfortunately just at the point where it seemed that process was ending in success it froze and despite repeated attempt s I can’t get that process to rerun.

I’m keen to make the switch to Linux Ubuntu and and am prepared to put the time in but I really do now feel between a rock and a hard place and struggling to remain enthusiastic ,hence this post.

Can anyone give this newbie guidance before I throw in the proverbial towel admit defeat and go back to Windows?

@davgwallace
Are you able to login to your user account? If so you should be able to run “sudo su” to gain access to a root terminal, to set root password just run “sudo passwd root”, from your account terminal, enter your passwd and hit enter, log it down somewhere.
Yes you can run “nano /etc/sudoers” from a root terminal and add user to the sudo list
Add User To Sudo List
Makes life and Linux a little more user friendly!!!

3 Likes

Hi @davgwallace,
Welcome to the forum.

Can you do a test?
Open a terminal window and type the following command:

sudo apt update

When the system ask you to enter password, enter your user password. You only have to try once.
Did the system accept the password?

Jorge

EDIT: Sorry, we replied at the same time. The next step, if the system accepted your password, was to do what @4dandl4 wrote in his post, so follow his post instead of mine.

1 Like

+1 for sudo su. I do it all the time, when I want to make system-wide changes.
Password required by sudo is the same as your users password, However, that user has to be on sudoers list.
Recovering the password is impossible, however there are ways to reset it.
After booting a live system, chroot into the installed system, and passwd thatuser and change it as you whish.

3 Likes

Simple answer would be to re install from new having carved the password in stone across your desk

2 Likes

An alternative to “sudo su” (which seems redundant to my eyes) is “sudo -i” - you get an “interactive” super-user session (with super-user or root’s profile)… Note also - “sudo su” on its own doesn’t load root user’s profile - when I run su - I always “su -” to load root’s profile…

Sure - it’s possible to “sudo su”, then “. .profile” (or maybe even “. .bashrc”) - but “sudo -i” (and “sudo su -”) take care of loading root’s profile / environment…

And what all the others said above, there is no “sudo” password - that password is your user password that you used to log into Ubuntu…

4 Likes

@daniel.m.tripp
Some distros, like Gentoo, will let one go from the user account to a root terminal by using sudo su. If one just uses su then the root PW has to be used and the /etc/sudoers file has to be set. I had forgotten about sudo -i!!!

1 Like

sudo is one of the packages Hyperbola Linux rejects.

Why not please explain.

https://wiki.hyperbola.info/doku.php?id=en:philosophy:sudo_complexity

There is an alternative… its called doas

1 Like

Thanks for your reply and to everyone else who kindly contributed. Knowing that It was the same as the Users Password allowed me to move on
Also appreciated all the useful hints about use of sudo and su

3 Likes