I was playing around with "User accounts" and somehow set automatic login. Now, when I start my PC, it just has one button named as "login". Clicking that button, directly logs me in to my PC.

There is no music or no asking for password while logging in. As a side effect, it asks me separately for keyring password

How to disable auto login and make login/keyring password unified again like before?

NOTE: Attempting to disable Automatic Login from System Settings > User Accounts does not work.

This is the content of my /etc/lightdm/lightdm.conf (where I have commented the autologin for my username mgandhi):

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
#autologin-user=mgandhi
link|improve this question

38% accept rate
Which os you are using? – abcd Feb 26 at 7:04
You may removed password .if yes give new password if you are using guest account it wont any password use up/down key to chose your account – abcd Feb 26 at 7:09
Have you tried to change your password? Also can you paste the content of /etc/lightdm/lightdm.conf? – desgua Feb 26 at 11:21
What exactly means does not work? – Octavian Damiean Feb 26 at 15:01
I think that it doesn't automatically login but instead it doesn't require your password, right? Also can you put the content of /etc/lightdm/lightdm.conf? – desgua Feb 27 at 4:17
show 2 more comments
feedback

8 Answers

System Setings

enter image description here

enter image description here

Disable Automatic Login

link|improve this answer
3  
I have already tried this, it's not working. – iammilind Feb 22 at 6:53
1  
If you disable automatic login you'll get a prompted by the keyring for your password. Perhaps that's what you're seeing. This wasn't the case back a couple of Ubuntu releases. – fragos Feb 26 at 22:39
feedback

gksu gedit /etc/lightdm/lightdm.conf

you should see something similar to this

[SeatDefaults]
autologin-guest=false 
autologin-user=username
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=unity-greeter
user-session=ubuntu

remove or put a # at the start of each line containing autologin, and save/exit and reboot to test.

link|improve this answer
I tried it, but no luck. – iammilind Feb 24 at 3:28
1  
are you using lightdm ? – duffydack Feb 26 at 21:15
feedback

go to your terminal and write this:

passwd

it will ask you with your new unix password and solved. :)

then, later, you can go to your user account and change anything:)

  • Mar
link|improve this answer
Tried it not working. – iammilind Feb 28 at 7:42
@iammilind maybe there's something wrong with your installation. If you haven't started yet with your project or what other stuffs there then how about try re-installing? Probably this option would save your time. – Mar Cejas Feb 29 at 11:04
feedback

Ok, finally the problem is solved. I got an email from an occasional stack-exchange visitor Mr. Rafter. Following is the way:

  • Run "sudo grep nopasswd /etc/*"
  • This will display at least 2 lines:

/etc/group:nopasswdlogin:x:112:<login name>
/etc/gshadow:nopasswdlogin:!::<login name>

  • Edit those files with sudo and remove only <login name> from those lines and save.
  • Go to "User Accounts" and disable the automatic login
  • Restart the computer and now it should ask for the password again!
link|improve this answer
feedback

I had the same problem and it was solved by the command:

sudo gpasswd -d USER nopasswdlogin

where you should change USER by your user name.

link|improve this answer
feedback

System Settings > User Accounts. Select your user and disable automatic login.

link|improve this answer
2  
I have already tried this, it's not working. – iammilind Feb 22 at 6:53
feedback

It's rare that @duffydack answer does not fit you... try this:

on a terminal do:

sudo vi /etc/gdm/custom.conf

or

sudo nano /etc/gdm/custom.conf

Your file should now look something like this:

[daemon]
AutomaticLoginEnable=false
AutomaticLogin=craig
TimedLoginEnable=false
TimedLogin=craig
TimedLoginDelay=10
DefaultSession=gnome-2d

edit AutomaticLoginEnable=true to AutomaticLoginEnable=false

that's other option.

link|improve this answer
I don't have any folder named /etc/gdm. I had tried this option earlier seeing from internet somewhere. – iammilind Feb 28 at 4:50
Yeah, this technique only works if gdm is the display manager, but lightdm is the default display manager starting with Ubuntu 11.10. – Eliah Kagan May 10 at 17:57
feedback

Since you was playing around with "User accounts" and I made same mistake, I got in same hole.

Keep cool.

You just set your system to no-password when "playing around".

That's why your system log in (auto or not) without asking for password, and this is the same reason keyring system asks for it (cause doesn't received from the system).

So, action jackson:

  1. Check what I am talking about. Go to Menu in Top Bar and choose 1st item (Switch User Account...) and see Login button (what mean you already logged and no user to choose, u can just login, u have no pass (OH!)
  2. After clicking Login, and back to desktop, Choose again in top menu bar the logout command, and logout. You gonna see a button with your username, no "login" button.
  3. Correcting things: Setting a new password. Set the same old one, to keyring dont get confused again, or it will ask you for the password again, after login with password provided. Go to same menu of item 1 and choose last item now (User Accounts...) and on this Gui interface , unlock on the respective button probably providing no password at all (just Enter, if this not works try with old pass..), and then THE GREAT MAGIC TRICK

CLICK THE PASSWORD BOX (its a hidden button, oh devil UI)

this open a dialog box (!) where u probably hit the "login without password" option AND with automatic login option ON too (outside this dialog, on User Accounts screen). SO:...

When you tell the computer to log in without a password (ITS NOT the same as Automatic Login) he does exactly this , log in, without password. So password = nothing. Then keyring goes crazy. (aha!) So, choose the right option now:

Set a password now

and after doing all the entry password stuff, simple hit enter, set automatic login off, to feel again the pleasure of having a password, and if you want it on again, ok, turn it on, but dont log in without a password again. =D

I hope this helps you to solve your problem. Was a good lesson to me. Bad UI to Ubuntu -1 on this case.

link|improve this answer
Maybe I am just wrong and you still have the same password, but system is set to login without it. – H_7 Mar 3 at 17:13
Correctly question should be "How to set again my system to use sytem password?" – H_7 Mar 3 at 17:15
no need of command line. passwd should do this too. Remember to CLICK the lock icon on User Account screen and provide password (!). Its really a bad bad UI. – H_7 Mar 3 at 17:29
I tried this method as well. Not working. – iammilind Mar 4 at 4:22
feedback

Your Answer

 
or
required, but never shown

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