Enable/Disable Passwordless Login/Autologin Via GUI/Command Line
I honestly don't know the difference. I'm not sure I've seen the phrase "passwordless login" where I haven't just assumed they're talking about auto-login.
For machines that use LightDM (11.04 up) you can add a user to the configuration in /etc/lightdm/lightdm.conf
using the autologin-user
variable so the file ends up looking something like this:
[SeatDefaults]
autologin-guest=false
autologin-user=oli
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=
user-session=ubuntu
That gives you a screen where that user (oli
in this case) is logged in automatically after a few seconds. If you want to alter that timeout so it happens more quickly , you can play around with the autologin-user-timeout
variable in the same file.
Here is how you can enable passwordless login from Ubuntu 11.10 onward.
-
Go to
System Settings
→User Accounts
-
Unlock the administrative functions by clicking the Unlock button in the top right corner and entering your password.
-
Select the user for which you want to enable passwordless login.
-
Click on the field/button next to Password.
-
From the Action dropdown list select
Log in without a password
and click the Change button.
Since none of the answers addresses the actual question
How do I do this with the command line? (passwordless login)
I paraphrase from the ArchWiki:
Add the following line to /etc/pam.d/lightdm
auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
and create and add yourself to the group nopasswdlogin
.
groupadd -r nopasswdlogin
gpasswd -a <username> nopasswdlogin
A systemctl restart lightdm
will show the effect. :-)