A broken config or corrupted files of the user might disable one to login using the gui. To get back to a graphical environment (does allow easier fixing), you can create another user and giving it optionally sudo permissions from a text-console.
Switch from the graphical login to a console, by pressing CTRL+ALT+F1. If you are not using linux mint, you might need to switch to the 2nd console using CTRL+ALT+F2 instead.
In the following a user myadm is created, where you could use a different name. The user is created with administrative privileges = member of the group sudo.
It's nice to have a 2nd full account possessing sudo-rights as backup, which can be used if the main-account (typically the only one able to run admin tasks) would fail some day.
A sudo-user can become root and access data of the original user with full access rights, which might get important to fix a broken main-user account.
The command adduser will ask you to enter a password for the new user. Do not try to use an empty password, as this will prevent login with many graphical login tools (and is a stupid idea anyways).
Do not confuse the adduser-command with the useradd-command, which is sadly often mentioned on web-resources.
Get a root-shell first (just for less typing):
Create the user and enter a solid password, which you should write down NOW. Other information, being asked, is optional and can be skipped by pressing enter:
Add the new user to the sudo-group:
usermod -a -G sudo myadm
Sync the filesystem and reboot (to be sure the changed config is read):
After reboot, login as the new user to fix broken settings, or whatever you need.
If you face an empty desktop (depends on your installed version of linux mint) or there are parts of the desktop-environment missing: press CTRL+ALT+Backspace
This will reset the x-session and return you to the login-screen. After doing the login for a second time your desktop should show up and work ...
If you turned on the autologin feature, for lightdm (login-/desktop-manager) with a zero-timeout, you got no real chance to select your fresh created user on boot.
To bypass this - you have to edit the file /etc/lightdm/lightdm.conf and (easiest option) add a comment-character # in front of the line starting with "autologin-user="
To edit the file in text mode, one can use nano:
sudo nano etc/lightdm/lightdm.conf
Where the edited file will look similar to this afterwards:
[Seat:*] greeter-show-manual-login=false allow-guest=false # autologin-user=youroldusernamehere
After saving the file, do reboot again. You should now be able to select the new user at the login dialog.
|IRC:nano.htm||a simple text-mode editor|
|IRC:fixconfig.htm||Test and reset corrupted config-files of a user.|
|IRC:notowner.htm||check for broken owner-ship of files/folders|