Exploring Mate User Manager and changed the Account Type to Standard just to see what it would do. The manager now cannot be unlocked with my original password. No other changes had been made to setups.
If I try to use terminal and use sudo, it errors out saying my username is not in the sudoers file.
Tried some suggestions online without success.
Anyone know of a trick to reset the Mate User Manager or restore my sudoers file?
To repair /etc/group, ensure that the relevant lines for admin have your basic username (a.k.a. USERNAME) correctly entered on the corresponding lines. The following are ONLY the lines with my username in them.
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
Defaults use_pty
# This preserves proxy settings from user environments of root
# equivalent users (group sudo)
#Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy"
# This allows running arbitrary commands, but so does ALL, and it means
# different sudoers have their choice of editor respected.
#Defaults:%sudo env_keep += "EDITOR"
# Completely harmless preservation of a user preference.
#Defaults:%sudo env_keep += "GREP_COLOR"
# While you shouldn't normally run git as root, you need to with etckeeper
#Defaults:%sudo env_keep += "GIT_AUTHOR_* GIT_COMMITTER_*"
# Per-user preferences; root won't have sensible values for them.
#Defaults:%sudo env_keep += "EMAIL DEBEMAIL DEBFULLNAME"
# "sudo scp" or "sudo rsync" should be able to use your SSH agent.
#Defaults:%sudo env_keep += "SSH_AGENT_PID SSH_AUTH_SOCK"
# Ditto for GPG agent
#Defaults:%sudo env_keep += "GPG_AGENT_INFO"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "@include" directives:
@includedir /etc/sudoers.d
Once sorted out, if you want to get the grub menu at every boot, have a look at this.
Yet another touch here.
If you manage to boot in rescue mode as root (mentioned by @ericmarceau) then you can issue the following command to grant your user sudo privilege
Thanks for the replies! I will copy them and print them for my Ubuntu Damage control folder.
Anyway, I lost patience with the issue and just reinstalled Ubuntu 24.04 from the Live SD. Just getting back to normal now. I used to depend on AskUbuntu for answers to difficult system questions but they only showed an ancient fix that didn't work. Ubuntu-Mate forum though, well done! Several answers.
One thing though, whatever I tried always asked for my password and then wouldn't accept my original password so I was blocked wherever I was working.
"Recovery mode" (a.k.a "Single-User Mode") used to not ask for the root password. (This was back in the days prior to Ubuntu 10.04.) But that was deemed a huge security risk, for clearly obvious reasons. Now the root password must be given. And since Ubuntu uses sudo instead of setting a real root password, Recovery Mode is kind of useless on Ubuntu out-of-the-box.
But here's the secret: If you add the following extra boot option to your boot command line at the GRUB screen (press E to edit the boot command line), you can get a root prompt without a password:
init=/bin/bash
This trick has worked for so many years -- the first time I remember using it was on a Caldera OpenLinux system from 1998 with a Linux 2.2 kernel!
By the way, I don't mean to be rude to anybody, but if you want my humble opinion: Boycott the MATE User Manager. It's a piece of cr*p. I actually know the guy who writes and maintains it, and I've submitted at least one pull request to patch it -- I've read the code, and the author clearly has no clue what he's doing or how to program. No offense to him, but if he can't even catch a glaring error like the password entry fields not being blacked out with black dots instead of the actual characters in your password, then should you really trust the tool at all?
Did I mention that I've been debating writing my own User Manager tool and proposing it be included in Ubuntu MATE in lieu of the "MATE User Manager"?
You must have some setup very different than mine as the Mate User Manager has had the password black ballooned out on my setup for years now. I didn't enter my pswrd today after the fiasco I've had to deal with the last couple days. Still getting things correctly set up.
Right now dealing with a Cannon iP-90 printer that is plugged in and has a solid green 'Ready' light, shows up in lsusb hardware search, and yet CUPS and Turboprint both say that it's not connected. Grrr.
You have surprised me a lot! I use to think that due to 'security considerations' a hallmark of Ubuntu is that it prohibits interactive root login by giving root account no password. That is why Ubuntu installation does not ask for root password and does not set it.
By the way, Ubuntu wiki claims there is 'Drop to root shell prompt' menu option in the recovery mode.
Exploring can be dangerous. I still use users and groups not Mate User Manager . I have had something similar happen to me also. Somehow my password got corrupted. What I always do after installation is set up a second account and give it root privileges but don't use it. Then if my main account has a problem I have anther sudo account to make changes.
How to Reset Forgotten Root Password in Ubuntu (via 2 Methods)