#✅ Lost Ubuntu user password
1 messages · Page 1 of 1 (latest)
if it's not an encryption password then the recovery boot option might have something. basically you can boot to it as root and use it to change the user password
alternatively if it's the root password they've lost can't they mount it in an iso and then just run 'passwd', assuming not encryption still of course.
Will the date be lost
If it’s encrypted you will need the password, if it’s not data should not be lost.
If it’s the root password your changing boot an iso and chroot in, then do passwd if it’s a user password just log in to root on a tty and do passwd <user> replacing g <user> with the username you’re changing the password for
how do I know if it is encrypted ?
because you'd have encrypted it? 😂
basically chroot in, and if you can mount it and see what's inside, it's not encrypted
don't even need to chroot
just mount from the iso
if it's btrfs mount the subvol
wait, I know your next quesiton, 'how do I know if it's btrfs'
do lsblk -f
i try th "mount -rw -o remount /" and
"passwd (username) "
some command suggestion come to line
lsblk -f
which one is your root?
look for /dev/<drive>
then mount /dev/<root drive> /mnt
replace <root drive> with that information
I'll give an example
The top one is /dev/sda1, and that is mounted at /boot/efi
so if it wasn't mounted and I wanted to mount it there it'd be mount /dev/sda1 /boot/efi
or if I was mounting sdb3, which is btrfs, I'd do this:
mount -t subvol=@ /dev/sdb3 /mnt
and then it would be mounted at /mnt
let me know if that makes sense @iron violet
ah can you tell me the full process ?
i want to roots and type this command "mount -rw -o remount /"
and after that i write the "passwd (username)"
after that command suggestion come and i don't know what to do
I don't know what is my roots . this has dual boot setup . and the owner of this PC is my father but my father forget the password
I don't know where you're getting that from?
show me lsblk -f
there are three types of file system you should be aware of:
vfat - for your bootloader, in your case almost definitely grub
ext4/btrfs/zfs etc. - your root, and if home is on its own partition, that as well
swap - used to supplement RAM, and is something that you need if you want your linux to hibernate
also i can't access to ubuntu I hope you understand that
do you not have an ISO?
I don't think you'll be able to fix this easily without an ISO
I suppose you could boot up the ISO in a VM and attempt to pass your drive into the ISO, not sure how easy that would be though
i didn't use it in the VM
I didn't say you did
press esc during boot, you should see the grub screen. from there go to advanced options and then the first that says (recovery mode)
in the menu go to root, press enter, then passwd [your username]
enter the password, confirm, and reboot
i don't know how if it's encrypted
that's nifty
I'm gonna try that now for my own machine, didn't know you could just do that
I installed it to try that 😆
I did this
but it didn't work
the entire process?
doesn't work on arch, I'll have to vm ubuntu
yeah the recovery thing is an Ubuntu
are you a sudoer?
what does that mean ?
how much experience do you have with linux?
very little
is this machine yours or your dads?
ls /home after you're in the root menu, usually the username is the same as the home folder
but is the machine / system yours or your dads?
my dads
ok thanks
coco | windows received a thank you cookie!
does he know that you're playing around with it?
yep
my brother install the ubuntu so that my father can learn about linux but my father doesn't care about it and he forgets the password
and now you want to learn about linux?
Yes
I always wanted but i thought ubuntu's password is strong so i didn't try it after few days ago i thought i should give it a try
okay, that's fine, just making sure you're not like, trying to hack your dad's laptop
no no
my father's main work is in windows
and i can easily access it . there is nothing in ubuntu
I'll create an ubuntu VM just so I can go into the ISO after and help you change the passwords
I just want to thank ubuntu for telling me everything installed correctly and then doing this for bootup:
I'll try to get a response to you soon.
@iron violet what you can do is just get pretty much any linux iso I think, ubuntu or arch should be fine. If it's ubuntu, do the 'try it' option, might take some time to load, then load terminal and do lsblk -f and look for the root partition, if you don't know which it is post a picture, then do mount /dev/<root partition> /mnt and then chroot /mnt, and it's simply a case after that of doing:
passwd <user>
passwd <root>
they can have the same passwords if you want, and assuming you got a successful password change do: exit and then shutdown now remove the iso and then start the machine up and go into ubuntu.
If you use the arch iso you'll start in TTY (essentially terminal) and the above commands should still work, I don't know specifically what other ISO's look like
install ubuntu and try my method 
you mean nuke their ubuntu and start with a fresh install?
no
you install Ubuntu and try my method lol
might as well
yeah I've got it installed, if I do that it needs the root password, which presumably ironer doesn't have
the chroot method needs no password unless the drive is encrypted
yeah but it probably doesn't have a password. they said their issue was with the username being 3 words
root on ubuntu takes on password of user it was made with
idk I installed it with the user as admin and it didn't require me for a root password to do the passwd part
Don't know what to tell you?
I just pressed enter when it asked for the password ¯\_(ツ)_/¯
did you enter a password for the user?
nope
as I said, ubuntu sets the root up with the same password as the user
that's why you could just press enter
How did you set ubuntu up without a user password?
wait I'm trying it again
I said I didn't have to enter the password, not that I didn't install it with one
apparently there isn't "as an admin"?
ahhh when I said enter a password for the user I meant on the screen I linked afterwards
I see the mis-communication now 🙂
ok tried again. su didn't work with the user password so no root login, and in recovery mode I could press enter
this is getting a bit offtopic lol but since ⬆️ was their issue then the next step can be to use ls /home to get the actual username
If they have any issues with passwords with your way then they should be able to do it my way using the ls /home once they've chrooted
yep
nevermind, you're right on that grub advanced options bit!
I suspect what caused an issue for me is that it happened after I reset both the user and root password manually
mounting an ISO is kinda hard for me because i didn't get some point that you mention
Well you’ve been given two methods on how to proceed, one from me and one from coco. If you need help with them then post what issue you’re running into, if you don’t then please close the thread by making it as solved
ok i will try this in when i will be free then i will give update about it
@iron violet boot an liveiso thru USB, open terminal, run
lsblk to get disk details, suppose your root partition is /dev/nvme0n1p1 you need to run
sudo mount /dev/nvme0n1p1 /mnt
next run
sudo su
mount --rbind /sys /mnt/sys && mount --make-rslave /mnt/sys
mount --rbind /proc /mnt/proc && mount --make-rslave /mnt/proc
mount --rbind /dev/ mnt/dev && mount --make-rslave /mnt/dev
chroot /mnt /bin/bash
passwd # this will change root password
passwd username # this will change password of your user
you don't need to do all of that, as per the two solutions coco and I have provided 🙂
^^^
^^^
i dont think just chrooting will work properly
you need to mount psuedo fs afaik
I installed an ubuntu VM to test it, it worked
good then 👍
Thank you
Your method work @plucky oxide
Now i can enter Ubuntu
coco | windows received a thank you cookie!
yw
You should edit the title to say solved