[SOLVED] Help! Can't log in - kid messed up account

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Bit Mad

[SOLVED] Help! Can't log in - kid messed up account

Post by Bit Mad »

My daughter's Mint 7 Netbook won't log in any more, because (I finally got her to admit) she had mucked around with accounts trying to change her login name (weeks ago, and she can't remember what she did).

She always used to log in as debbie, with /home/debbie but now it's looking for /home/debs and not finding it, because it doesn't exist.

I've booted up using a USB stick, and managed to copy /home to the never-used Windows partition for safekeeping (drag and drop didn't work, even with the root red background in Nautilus - so I had to mess around with a sudo cp /media/disk/home/* /media/disk-1/mintbak/ -r and it seems to have copied everything),
- but I need to figure out how to change the accounts while booted up via USB so I can log in again normally from the harddisk. I can't log in, even on a ctrl-alt-F1 terminal, using her previous login name or the "new one" with the password she uses.

Can I edit a file somewhere and restore the account name and password in order to re-use the original debbie name and home folder - and hopefully this will restore all the settings, right?

Thanks!

(name changed to protect the innocent - she's not a Debbie but it illustrates the problem well enough!)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
BigSteve_G

Re: Help! Can't log in - kid messed up account

Post by BigSteve_G »

Hi

If you boot from a live disc,
chroot to the drive where the installation is then run 'cat /etc/passwd' to find the name.
Once you've found it from the list run 'sudo passwd usersname to change the password

- Then just reboot
Bit Mad

Re: Help! Can't log in - kid messed up account

Post by Bit Mad »

Many Thanks, but I just managed to solve it "on my own" :D
(as in : on my own via the ever helpful masses on the internet)

Thanks to Google giving me http://nixcraft.com/getting-started-tut ... -line.html to point me in the right direction....

I booted up via the USB stick, went to /etc as root with the red background, and edited the last line of /etc/passwd to point to the right folder -
debbie:x:1000:1000:debbie,,,:/home/debbie:/bin/bash

It then booted up normally, no password required as usual. I couldn't get sudo to work until she finally remembered what she'd changed her password to, then we finally managed to get sudo passwd debbie to work and changed it back to the original.

What I relief. I can't imagine how I'd have managed that with Windows :lol:
Locked

Return to “Installation & Boot”