Score:1

How do I set up password-less login via GUI in Ubuntu 20.04?

cn flag
Jan

I have read that in old versions of Ubuntu, you could set user so it is allowed to log in without password. That choice is not available now (seems like someone "smart" knows that we do not know what it means secirutywise). Instead, we are required to go through bunch of terminal commands and execute many of them with elevated authorization (sudo visudo). Normal user who does not use terminal cannot do that, yet many of them wants to have passwordless login, like for kids playing games. What is the easiest GUI way on Ubuntu 20.04 to set passwordless login for user?

Raffa avatar
jp flag
"Password-less" might not be the correct name … It’s called [Automatic Login](https://help.ubuntu.com/stable/ubuntu-help/user-autologin.html.en)
pa4080 avatar
cn flag
In addition to the automatic login option you may need to setup empty password for the default [Gnome keyring](https://wiki.gnome.org/Projects/GnomeKeyring/). Don't be evil with Ubuntu, along with different Linux distros I'm using Windows and macOS and to be honest, I don't know how to setup passwordless login there too :)
Raffa avatar
jp flag
@pa4080 I am not sure about this one as it will handle saved passwords in plain text so not recommended and also not needed for automatic login itself to work … IMHO
hr flag
There certainly used to be this feature (a `nopasswdlogin` group, separate from the automatic login feature), at least when using LightDM - see for example [No password asked at login screen just start session button with LightDM](https://askubuntu.com/questions/100010/no-password-asked-at-login-screen-just-start-session-button-with-lightdm)
guiverc avatar
cn flag
FYI: Some ISOs have a check-box that can be *checked* during installation, meaning the GUI won't ask for a password on boot (*this includes 22.04*). The options of the DM vary on DM of course; some being easier than others, but Ubuntu has *five* installers available depending on product/release & if you select the primary/alternate ISO (*manual navigation maybe required to pick non-primary ISO*) You can change the DM if you're not happy with default (*pros & cons maybe involved of course as with everything*)
Score:5
jp flag

Automatic Login

This will automatically login into a certain user after reboot ... But, password will be required after screen lock or logout ... This is described in the official Ubuntu documentation:

  1. Open the Activities overview and start typing Users.

  2. Click Users to open the panel.

  3. Press Unlock in the top right corner and type in your password when prompted.

  4. If it is a different user account that you want to log into automatically, select the account under Other Users.

  5. Switch the Automatic Login switch to on.

⚠ Passwordless Login ⚠

This will allow a user to login without a password e.g. by clicking on the username from the list of users in the login screen ... This is described in man passwd:

-d, --delete    Delete a user's password (make it empty). This is a quick
way to disable a password for an account. It will set the named account
passwordless.

This means you need to, first, set a password for a certain user ... Then, delete it afterwords like so:

sudo passwd -d user

Where user is the actual username for the user you want to delete its password.

This, however, can be very dangerous(i.e. totally compromise your system, data and privacy) if that user is an administrator account ... Please, don't misinterpret my previous statement, it's still dangerous even for a normal(non administrator) account although to a much lesser extent.

Please, notice as well that this method doesn't make sense and cannot work normally if that user has an encrypted home directory which needs a password/passphrase to decrypt and mount ... Therefore, you'd still need to run ecryptfs-mount-private and supply your password/passphrase in order to decrypt and mount your home directory or otherwise, you won't be able to use your current home directory.

cn flag
Jan
Thank you. I tried to delete the password with -d option. I really could login without entering password at first. However, later that account was completely deleted and everytime I tried to log in, I was presented with completely blank new account which did not save any changes. I think it may have been related to ecryptfs encryption I use for admin account.
Raffa avatar
jp flag
@Jan It appears that your user had an encrypted home directory which needs a password/passphrase for mounting/decrypting and therefore cant be used with this method as it will be meaningless ... run `ecryptfs-mount-private` after login to that user(*passwordless*) and supply your old password to mount and access your home directory ... Then backup your data and create a new normal unencrypted account to use for passwordless login and you'll be able to use it normally ... Passwordless login can't work normally with an encrypted user home directory.
ar flag
@Jan Why is the information about encryptfs not in your question?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.