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
and you will see output resembling the below
Very near the top, you can see a line which starts with
and about 5 from the bottom in mine you can see a line which begins
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)
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