[SOLVED] Ubuntu wants a password that I isn't one of the three that I have created.
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.
Ubuntu wants a password that I isn't one of the three that I have created.
I just finished a dual boot install of Ubuntu 18.04 and Win7.
During the Ubuntu installation I was required to create three(3) passwords:
1. Account logon;
2. Ubuntu One - "A single account for all ubuntu related services and site; and
3. Livepatch - "default keyring".
When I tried to reset the server to USA (I had thickfingered a typo in the install and missed my choice of services by one continent and an ocean) I was asked for my password.
I tried each of the three passwords I had created. None of them worked.
At that point I gave up for the night.
Today when I tried to activate a software choice the same thing happened.
I just tried to make a selection from "Ubuntu Software". An authentication request popped up with my user name. I tried each of the three passwords again in succession, only to be denied.
When I did the install I set it for automatic logon. It is possible that I made a typo then and that the logon password I need to enter in these instances is the logon - but of course all I can see are asterisks.
Since I am a newbie with Linux, a simple solution which I am overlooking probably exists, but it's beyond me to see it. I will appreciate any help I can find.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
The problem you have is that, the default user account created during the installation of Ubuntu is also what you call a "sudo" account. "sudo" stands for "superuser do", the "superuser" is otherwise known as the "root user", which is the most powerful user account in Linux, and can perform any operation possible. "sudo" can grant "root" permissions to normal user accounts that don't normally have any "root" permissions (as it's used for in Ubuntu), like installing software system-wide, creating user accounts, making other system-wide changes, etc. By default in Ubuntu, the actual "root" user account itself is disabled, and therefore you would need to use the user account that was created during installation of Ubuntu to enable it. You would do this by using "sudo", to be more precise and generally speaking, you would append "sudo" to the front of whatever command it is you wish to run with "root" permissions.
You should be able to "chroot" into your Ubuntu installation to change the password for the user account created during installation, but this might be complex for someone who's new to Linux, and not easy.
You could also simply use a "live" system to mount it's root partition and then simply remove the hashed password from the /etc/shadow file, but be *very* careful if you do this!
I would add to the above post that, if you can turn off auto-login, do so. Then upon logging out and logging back in, you can find out whether the user password you are using actually works or is misplet.
You can chroot from another linux option and set the password if you don't know the actual password. It might be that you had the capslock key on when you typed your password. Passwords tend to be case sensitive. It could also be that your keyboard was set to another nationality which changes what was actually typed when you typed. Like a UK keyboard configuration on a US keyboard gives the funky L instead of # when hitting shift+3. Oddly things like raspbian default to the UK configuration. Well, not that oddly since the raspberry pi is of UK origins.
$ sudo dpkg-reconfigure keyboard-configuration
One of the first things we americans have to do when setting up a raspberry pi. But kind of hard to do if you do not have the password, or set it up with quirks and cannot reproduce it. But as I said you can chroot to it and change it. Otherwise windows methodologies work too, nuke and pave, aka re-install and don't typo this time.
I disagree with jsbjsb100 about chrooting being difficult. You just have to work carefully and systematically.
First jot down on paper the name of your root partition (for example sda1). Then boot your computer from a suitable CD. Your Ubuntu installation disc should work just fine. Once Ubuntu is up and running, open a terminal from the menu. You should see a prompt with a # sign (probably in red), indicating that you are now root. You don't get that on an installed Ubuntu.
Root has superpowers so work carefully from now on! Type mount /dev/sda1 /mnt to mount your normal root partition. This makes the /mnt directory a synonym for the root directory of your normal root partition.
Now comes the magic: type chroot /mnt. This changes your root partition from the root partition of the CD to that of the installed Ubuntu (chroot = change-root). In effect, you are now in the installed Ubuntu as if you had booted it directly, but with root powers.
Now to check your password: remember that installation discs usually use the US keyboard by default, so if you have included punctuation marks in your password (which is highly recommended), they may not be the ones indicated on your physical keyboard. So before you try to change your password, check first that the password you enter really is the one you think you are entering. A useful trick is to type it out experimentally after the prompt as if it was a command. You will get an "command not found" error of course, but you will be able to see exactly what comes out.
Finally type passwd followed by your normal user name. This is the command to reset your user password. Since you are now root, you won't need to give a password in order to do this. Enter the password twice. Then type exit to get out of chroot, and reboot from your hard drive.
@shadow7: that "funky L" is a pound sign. It's our currency symbol.
It's asking for the password for your user. If you messed that up during the install you basically have two choices: 1. Do as suggested and use the live installation image to chroot into the system and change it as suggested above. 2. As it's a fresh install just reinstall it from scratch and pay closer attention this time.
I sincerely thank those who responded to my post. I'm used to the language of Microsoft, and once upon a time spoke MSDOS fluently. GUIs changed that.
I now have entered into the world of SUDO. I was looking for an activity to help keep my brain alert in my declining years. So far it's working.
It was a typo.
Again.
thank you.
eckisredux
Last edited by EckisRedux; 02-22-2019 at 12:36 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.