How to Enable No Password Login in Ubuntu, Fedora, Manjaro & Linux Mint

Image by mohamed Hassan from Pixabay

This simple tutorial shows how to enable password-less login for specific user in Linux PC. So, user doesn’t have to remember the password, just a single click will let in.

It’s easy to enable automatic login, even with a few seconds delay. But for multiple accounts (e.g., guest or user account for kids), remove the password authentication could be a better choice.

This tutorial is tested and works in Ubuntu 22.04, Ubuntu 20.04, Fedora 36, Manjaro GNOME, and Linux Mint 20/21

Requirements:

To enable this feature, you need login with a user account that has the ability to edit system config file (aka, administrator).

As well, new user account must have been login for the first time to generate user’s home folder.

Enable no password login for specific user:

1. Firstly, open terminal by either pressing Ctrl+Alt+T on keyboard (works in Ubuntu/Linux Mint), or searching from start menu or “Activities” overview.

Open terminal

2. When terminal opens, run the command below to edit the config file:

sudo gedit /etc/pam.d/gdm-password
Tip 1: For Ubuntu 22.10+ and Fedora 36 replace gedit with gnome-text-editor, so the command will be: sudo gnome-text-editor /etc/pam.d/gdm-password

Tip 2: This is for GNOME only, other desktop may have another config file under "/etc/pam.d" directory, such as "/etc/pam.d/lightdm" for Mint.

Tip 3: Linux Mint user DON'T have to edit any config file. Just run bottom command to add user into 'nopasswdlogin' group.

3. When the config file opens, add the rule to the first line:

auth sufficient pam_succeed_if.so user = merilyn

Replace merilyn with the desired username and save the file!

That’s it! After saving the file, restart computer and click the username in login screen to see the magic!

Password-less login for a group of users:

Besides writing multiple lines in previous config file, you may add users to a certain group, and set to allow all users in that group to login without password.

1. First, open terminal and run command to create “nopasswdlogin” group.

sudo groupadd nopasswdlogin
Create group ‘nopasswdlogin’

2. Next, edit the config file via command:

sudo gedit /etc/pam.d/gdm-password

Replace gedit with your system text editor, such as gnome-text-editor for Fedora 36/Ubuntu22.10.

Add the line below and save it:

auth sufficient pam_succeed_if.so user ingroup nopasswdlogin

NOTE: Linux Mint only need to do last command in step 3 as 'nopasswdlogin' group already exist and well configured.

3. Finally, add (or remove) any user into/from that group (nopasswdlogin) to enable (or disable) password-less login.
For example, add user ‘merilyn’ to the group via command:

sudo gpasswd --add merilyn nopasswdlogin

replace --add with --delete will remove user from the group

Restart your machine to apply changes and done!

Summary:

Thing is quite easy in short. Just edit the configuration file under “/etc/pam.d” directory. Then add a rule to either allow certain user or all users from a group to login without password authentication. Linux Mint has a ‘nopasswdlogin’ group set for this stuff out-of-box, so simply add a user into that group can do the trick!

Merilyn Ne
Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.