How to recover my lost/forgotten password in my Linux terminal?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to recover my lost/forgotten password in my Linux terminal?
The first problem I have is that I'm a low tech elderly guy. I've received recent updates for the first time in years. I currently use 14.04 & wanted to update to 16.04 but I now understand you've already on 20 or 21 & I have never received any notice of any updates until a few weeks ago. But I can't update because I can't get into the terminal as I lost/forgotten my password. I've tried many web-sites including webmaster@ubuntu.com & many have offered free assistance but, I've tried everything & cannot get into my terminal. Is there a way to recover my terminal password so I can follow updates?
Is there a way to recover my terminal password so I can follow updates?
I presume it is Ubuntu you are talking about.
There is no way to recover the password, but there are work-arounds* to allow you to reset the password. Whether you reset the password to the same thing is up to you.
However, with that old a system, which by the way hit end of life a long time ago already, your best approach would be to back up everything in the home directory to two separate external media and then do a fresh install with Ubuntu 20.04 and restore the home data from backup.
Back up copies are important and storage is inexpensive nowadays.
Another useful thing to arrange for the future is to always have a bootable "rescue" device available for jobs like this. There are specialised rescue distros like SystemRescue that you can download and put on a CD or a memory stick for future use, but for distros like Ubuntu, the installation image will usually do just fine. When you boot from it, you immediately have a running system independent of your hard drive, and in that system you are the root user. So you can mount your normal root partition on some suitable empty directory (most people use /mnt) and do whatever you want with it including resetting the root password.
Unfortunately, because ubuntu 16.04 expired on April 30th this year, you won't receive any updates for 16.04..... Unless you pay for them.
Quote:
I now understand you've already on 20 or 21
As I understand the ubuntu system, the numbers indicate the month and year the distro is released.
If I am correct, then the current ubuntu's will all be using 21.XX
Quote:
I have never received any notice of any updates until a few weeks ago. But I can't update because I can't get into the terminal as I lost/forgotten my password.
I suggest you abandon your current ubuntu and install a current distro. However I believe you'll need to become root to write an iso to a usb to do an install. so you could be in a world of pain to write any distro to a usb.
As for getting updates, that is a relatively simple matter of becoming root, selecting a mirror and giving your computer the correct instructions.
Before doing an update/upgrade you will have a copy of EVERYTHING you want to keep on an external drive, won't you?
What is saved on that machine you don't want to lose ?
Pictures?
Books ?
Word documents/tax records.
Let us (me) know and you can save that stuff to a USB thumb drive, install a new system and move them into the new systems documents folder.
What web browser do you use ? Fox? Chrome?. That stuff can be saved to the same thumb(usb) drive and imported to your new system. No sweat
Turbocapitalist nailed it.
Ubuntu 14.04
At boot you see grub . If not press the right hand shift key button. Now you see the menu press the letter "e"
at the end of the vmlinuz line add this.
Quote:
init 1
then press the ctrl pluss the "x" key to boot.
In the terminal type passwd now give root a password.
you will not see any typing just put it in as it asks.
Now type init 4.
from then on in 14.04 you have a new user root.
And in 14.04 you are able to login as root.
From there you can give reset that sudo users password.
or if you want to use root.
Just open a terminal type su then password do all your apt-get you want.
Don't think there is any root password. Perhaps I am mistaken but by default root account is disabled in Ubuntu. I would suggest to use live distribution - all iso's for Ubuntu are now hybrid, yes? But no matter there are plenty live distributions around. Use live distribution to copy most important files and as others here suggested install new version of Ubuntu.
Edit: Perhaps if your computer is very old - it may be not possible to run recent Ubuntu versions. But there are others distributions for old computers with Mate as desktop - they will serve you well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.