Solved Cannot create a password

Solved issue

Oldgaffer

New Member
Joined
Oct 6, 2024
Messages
10
Reaction score
7
Credits
81
The problem is that I cannot set a password. I have a new laptop from Tuxedo Computers, with their OS (Ubuntu “Jammy Jellyfish” based) pre-installed. On set-up I gave it a password, which was then not recognised when I had finished the installation and, among other things, selected the UK keyboard. So I made a new clean installation, selecting “No password” just to be sure – thinking I could create a password later. However, passwd asks for the old password and will not accept a null input. The same is true using sudo. Is there a way round this?
 


did you by chance set a root passwd? This situation baffles me a bit in that I've only ever had a password rejected by my own fault (typos). But maybe there are circumstances I've yet to encounter that someone more experienced than myself may be able to she some light on.

Did you create a root password by chance? If so, su root and try executing passwd from there. No need for sudo at that point.
 
This make of computer comes with LURKS encoding, so hopefully you have it is this you have lost, however if you added a password to the bios and lost it, your screwed,
The old trick of removing the power leads [and battery if laptop] and, cosmos battery doesn't work on this make. And at your cost it will have to be returned to the manufacturer for a new chip to be fitted

If its the lurks password see
 
did you by chance set a root passwd? This situation baffles me a bit in that I've only ever had a password rejected by my own fault (typos). But maybe there are circumstances I've yet to encounter that someone more experienced than myself may be able to she some light on.

Did you create a root password by chance? If so, su root and try executing passwd from there. No need for sudo at that point.
Hi AlphaObeisance. I din't set a separate root password. Tried su root. It asks for a password. Entred return (thre being no password) and it responds "su: authentification failure".
 
This make of computer comes with LURKS encoding, so hopefully you have it is this you have lost, however if you added a password to the bios and lost it, your screwed,
The old trick of removing the power leads [and battery if laptop] and, cosmos battery doesn't work on this make. And at your cost it will have to be returned to the manufacturer for a new chip to be fitted

If its the lurks password see
Thanks Brickwizard. Trying with Luks, Tuxedo say: "The user must know the previous password in order to enter a new one." It's beginning to look like I'll need another clean install.
 
So I made a new clean installation, selecting “No password” just to be sure – thinking I could create a password later.
Obviously that doesn't work out of the box, so reinstall and create a password next time.

If you insist on no password there is solution:
 
Thanks CaffeineAddict. As mentioned, it was never my intention to have no password. It's creating one now that's the whole problem. The rejection of my original password, it's been suggested, may be due to the change in keyboard. The original input was made before the country keyboard option in setup and Tuxedo OS does not have a "show" option, so I couldn't know what was recorded. Whatever. I think I have to reinstall and try again.
 
Whatever. I think I have to reinstall and try again.

If you're coming from the Windows world, boy aren't you going to be pleasantly surprised.
 
Just in case this becomes necessary.....and at this point I am NOT convinced that it is....
 
You can try to boot up from the installation disc and try to edit the /etc/shadow file on your computer's root partition. Remove the hashed password to leave the field blank for any account you don't want a password for, like root, and save the file. Then sync and umount the root partition. Then reboot. Fix your keyboard issue so you get what you were typing so you can rely on it. Then use the root account to set the password for all of the account you want to use passwords for.

Signed,

Matthew Campbell
 
Condobloke, Trenix25, and all who have replied: In one way I'm really enjoying the problem. Delving into all this is great fun (once I park my frustration). Many thanks to you all for taking the time and trouble to write. I'm making a plan to try things in sequence, with a complete re-install as the final, and somewhat defeatist, option. Here goes ....
 
@Oldgaffer I'll be back on deck (Australia) in about 14 - 15 hours, and may have an alternative.

You could let me know:
1.Do you have a Grub Menu, or does it take you straight to the login screen?
2. Is Ubuntu the sole OS or are you dualbooting with Windows?

Cheers and welcome to linux.org

Chris Turner
wizardfromoz
 
Hi Chris,
Without a password it loads straight to the GUI, but, of course, I have full access to commands.
I'm not dual booting - the Tuxedo Linux OS it the sole OS on the system. I have been considering adding another so I can boot into an alternative.
Sleep well!
Stephen
 
Tuxedo say: "The user must know the previous password in order to enter a new one."

That is often the case, but not with this method. There is an exception to every rule.

I performed this exercise from Linux Mint 22 'Wilma' Cinnamon, but it works from Ubuntu and other distros as well.

I expect that your laptop, being new, runs UEFI, but if BIOS just substitute Shift key (could be left or right) for Esc key.

1. Boot your computer and as soon as the logo appears begin tapping the Esc key, a Grub Menu should appear.
2. The menu should show Ubuntu at top and then a line for Advanced Options, choose that.
3. There may be 3 to 6 lines, choose the uppermost one that features the word Recovery.
4. The computer will spool a lot of output and come to a pause with a graphical menu of options. Arrow down to "Drop to root shell", press Tab to highlight OK and press Enter.
5. Press Enter again, for Maintenance and you should be at a prompt which ends in a # , you are now Root.
6. Now we want to establish our userid, exactly . Type and enter

Code:
cat /etc/passwd

and you will see output resembling the below

VcRLmGJ.jpeg


Very near the top, you can see a line which starts with

Code:
root:x:0:0:root

and about 5 from the bottom in mine you can see a line which begins

Code:
chris:x:1000:1000:chris

So my userid is chris, yours may be Oldgaffer, or other.

Armed with this knowledge and bear in mind it is case-sensitive, at the prompt,

7. Type in and enter

Code:
passwd yourusername #(substituting your actual username)

Isa2tm3.jpeg


8. Put in your password as it asks for it (you will not see movement, for Security reasons) and retype it as prompted, and press Enter after each.

9. Reboot, and hopefully you should get the login screen and be able to log in, and also use sudo.

Sing out with any problems.

Wizard
 
Really helpful, Wizard. Many thanks. I'll be away from my office (and the computer) for a few days but will have a go at this as soon as I'm back.
Stephen
 
Hi Wiz.
Sitting in an airport, flight delayed. So I ran through your plan. It did indeed work! Password entered and accepted. I then rebooted but it went straight to the GUI without asking for the login password. I then entered passwd to try and change the password just accepted. That also went fine - confirmation received that the password was accepted. But on reboot it still dosen't demand a login. So close! Any thoughts?
 
Any thoughts?

Yes - if you are using the standard Ubuntu 'Jammy Jellyfish', that will be the Desktop aka GNOME version. I'll slip into one a little later in my day.

There will be a section for managing Users, where you can check or uncheck Login - Password Required or similar.

If you find it before I do, sing out.

Cheers
 
Stephen

lN1tpEr.png


So unlock, near top right, using password, then make sure that that automatic login is switched to off, exit out and reboot and see how you go

Wiz
 

Members online


Latest posts

Top