1

I am not a confident Ubuntu user but changed my password due to unexplained usage issues. I copied carefully the suggested Ubuntu password, but it will not work, neither will the previous one, nor removing the last entry in case I hit backspace.

I tried changing it using this article How do I reset a lost administrative password?, but it will not complete due to a dependency for a USB stick I have not used for ages because it was causing problems.

From GRUB I select the latest Kernel in recovery mode. The screen is pink with the options spread to the right of the options box at increasing indent.

I selected Root Drop to root shell prompt. The result:

[OK] started Avahi mDNS-SD Stack
[OK] Started Cups Scheduler
[OK] Reached target Printer Support
     Started Save/Restore Sound Card State...    
[OK] Finished Save/Restore Sound Card State
[OK] Reached target Sound Card
[Time] Timed out waiting for device/dev/disk/by-id/usb-UGREEN_MassStorageClass_123426789ABCDE-010
[Depend] Dependency failed for/mnt/usb-UGREEN_MassStorageClass_123426789ABCDE-010

Then I tried again by another option on the same article by editing the Kernel. From GRUB I selected my latest Kernel and pressed e. The result:

set params, with Linux 6.5.0-41-generic
record fail
Load-video
gfx mode $ Linux-gtx-mode
insmod gzio
If [xtgrub_platforms=xxen l: then insmod lzopio fi
insmod part-gpt
insmod ext2
Search -no floppy --fs-uuid --set=root ifzbfc8b-34be-4a7b-93d3-828c6975le71
echo 'LoadingLinux6.5.0-41-generic... 
Linux /boot/unilinuz-6.5.0-41 generic root = if2bfc06 ro apm = power_off
initrd /boot/initrd.img-6.5.0-41 generic
There is no line Starting Kernel

If you can see the problem can you advise how to delete the dependency when I can't log in and advice on the best way to recover my password?

2 Answers2

2

Your first solution is the correct one. To stop the error message in Ubuntu 24.04 do the following:

  1. Boot with your Ubuntu USB and choose Try Ubuntu.

  2. Once the Panel appears, click on <size> Volume (in my case 31 GB Volume).

  3. In the opened window locate the etc folder.

  4. Right-click on it and choose Open in terminal and continue from point 5.

If you need to find the name of your partition, use:

   sudo blkid

and then you can mount it with:

   sudo mount /dev/device_name /mnt

In the above command change device_name to your partition, for example sda4.

Run:

   cd mnt
  1. Make a copy of your fstab to keep it as a backup:

    sudo cp fstab fstab.old
    
  2. Run:

    sudo gedit fstab
    
  3. In fstab locate the line that has usb-UGREEN and add a # to the beginning of the line.

  4. Save and close fstab.

  5. Restart your computer.

  6. Drop to root shell prompt, and use the same link in your question (How do I reset a lost administrative password?) to reset your password.

amar
  • 2,140
1

The answer in the end was simple.I plugged in the device causing the dependency, the dependency nolonger existed and the passord was changed. Thank you again Amar