I have succeded to block admin account. How to restore it?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
vavolop
Level 1
Level 1
Posts: 3
Joined: Sat Sep 15, 2018 2:36 pm

I have succeded to block admin account. How to restore it?

Post by vavolop » Sat Sep 15, 2018 3:08 pm

It happened on Mint Sylvia 18.3. All was done using standard window tools (without command line).

First I created a new user account named "User". Then I registered under the User account and entered again the utility for user management. There I saw that damn button which was something like "Disable account". This way the admin account was disabled. But when I try to enable the account again it says that I don't have enough permission to do this operation. Funny, but I need to restore it somehow. :D Maybe command line can help?

deepakdeshp
Level 11
Level 11
Posts: 3853
Joined: Sun Aug 09, 2015 10:00 am

Re: I have succeded to block admin account. How to restore it?

Post by deepakdeshp » Sun Sep 16, 2018 1:32 pm

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

rene
Level 8
Level 8
Posts: 2226
Joined: Sun Mar 27, 2016 6:58 pm

Re: I have succeded to block admin account. How to restore it?

Post by rene » Sun Sep 16, 2018 5:03 pm

A bit more specific than above suggestion:

A "Disable account" button I haven't found but indeed you can simply delete the last Administrator account. Before you do "User" is upon opening "Users and Groups" asked for the password for the standard Administrator account; after you do, for the root password -- which Mint 18+ doesn't have by default, putting you in somewhat of a bind indeed.

1. Give yourself (i.e., "User") a password: from a terminal, passwd.
2. User is not a valid UNIX user; find out what "User" is known as UNIX-sides with whoami. I will assume it is "user" without the capital U.
3. Reboot into the GRUB menu; on a BIOS-system you press and hold Left-Shift at the right time, on UEFI you hit Esc at such time.
4. Pick (one of) the "rescue mode" entries from the "Advanced options" submenu.
5. This boots you into a T(ext-mode) UI with "Drop to root shell prompt" as one of its options; take it.
6. Once dropped, remount the root partition read-write with mount -o remount,rw /.
7. Make "user" an Administrator user with adduser user sudo.
8. exit and find yourself back at the TUI; pick "Resume normal boot"
9. Login graphically as User and find yourself capable of administering stuff again.

You can at this point put back your old Administrator user and, once done, demote User again, or... well, anything. Note, seeing as how it seems you can only have deleted rather than disabled the original administrator account this will likely mean you deleted its home directory alongside. That is, don't expect it to still be there...

Post Reply

Return to “Other topics”