1

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?

5
  • "Password-less" might not be the correct name … It’s called Automatic Login
    – Raffa
    Commented Apr 8, 2023 at 16:19
  • In addition to the automatic login option you may need to setup empty password for the default Gnome keyring. 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 :)
    – pa4080
    Commented Apr 8, 2023 at 16:30
  • @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
    – Raffa
    Commented Apr 8, 2023 at 16:35
  • 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 Commented Apr 8, 2023 at 19:12
  • 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)
    – guiverc
    Commented Apr 8, 2023 at 22:27

1 Answer 1

5

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.

3
  • 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.
    – Jan
    Commented Apr 10, 2023 at 17:08
  • @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.
    – Raffa
    Commented Apr 10, 2023 at 17:59
  • 1
    @Jan Why is the information about encryptfs not in your question?
    – user68186
    Commented Apr 10, 2023 at 18:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .