Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Before I ask the question, would someone please help stipulate the Ubuntu definition for these two seemingly identical but different terms (I've given drafts.):

Autologin - When you power up the computer, you sign directly into your account.

Passwordless Login - When you pick a user at the greeter and you are logged in without a prompt for a password.

Now, for the question. How do we change each via the command line? Is the solution the same for all currently supported releases?

And for those who would rather use the gui method, how is that done?

At the bottom of this pic is the checkbox for a passwordless login. It says:

Don't ask for password on login

How do I do this with the command line?

enter image description here

share|improve this question
1  
Run it with strace then sudo strace -o /tmp/trace -e open users-admin , you can then look in /tmp/trace for the files opened. –  bodhi.zazen Mar 1 '12 at 1:10

3 Answers 3

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.

share|improve this answer
    
I used the conf file the gui made for autologin. I deleted it, and then there was no autologin. I copy it to /etc/lightdm in an upstart script and it doesn't make it autologin. Even after a few reboots. Is there a daemon? –  bambuntu Mar 4 '12 at 17:19

Here is how you can enable passwordless login from Ubuntu 11.10 onward.

  • Go to System SettingsUser Accounts

  • Unlock the administrative functions by clicking the Unlock button in the top right corner and entering your password.

    User Accounts unlock button

  • Select the user for which you want to enable passwordless login.

  • Click on the field/button next to Password.

    User Accounts overview

  • From the Action dropdown list select Log in without a password and click the Change button.

    User Accounts actions

share|improve this answer

I initially followed the answer from Oli, but the VM complained about running in low-graphics mode. I think Oli turned off/changed a few too many things by clearing greeter-session. In my case, I want the UI to run. To enable this, only required adding two lines to the /etc/lightdm/lightdm.conf file.

   autologin-user=<username>
   autologin-user-timeout=0

so the complete file looks like:

   [SeatDefaults]
   greeter-session=unity-greeter
   user-session=ubuntu
   autologin-user=<username>
   autologin-user-timeout=0

to test your changes without rebooting sudo service lightdm restart

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.