I just installed Ubuntu 12.10 and afterwards, I accidentally set the administrator account password to empty/null. This gave me problems when trying to do administrative tasks in the GUI, so after reading up on askubuntu I used the passwd command to set the password for the account anew.

However, at the login screen when clicking on the account, I'm not asked to enter the password; but, instead, I log in directly as if there is no password set for the account.

When doing administrative tasks in the GUI, I will be asked for a password.

What do I do to be asked for the password at login time?

I did already try, several times, in the User Account settings window to set a new password for the account. That is, in the settings window it does not say "login without a password" for my account and it shows that there is a password set for the account.

  • So I stumbled over someone (handytutorial.com/manage-users-and-groups-in-ubuntu-12-10-12-04) suggesting to install gnome-system-tools. I did that and it presents the settings for my account as "do not ask at login" (which is exactly what I experience). Changing it using gnome-system-tools solved the problem for me. Could it be a bug in the unity user setting thingy? – T. N. Nov 4 '12 at 16:15

Run the following command in terminal:

sudo gpasswd -d username nopasswdlogin

substitute your username for username.

  • You are assuming there is a group name nopasswdlogin? I don't have such agroup. – guntbert Apr 15 '13 at 7:07
  • This was my problem, thank you! – HeatfanJohn Apr 26 '15 at 17:44

I believe all you need to do is go to the "Settings->User Accounts->Unlock->Automatic Login-> Off"

If that doesn't work you can always create a new account and delete your old one. If it is a fresh install this might be the easiest.

You can also manually edit the lightdm configuration file

gksu gedit /etc/lightdm/lightdm.conf

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

Put the pound(number #) symbol in front of all the autologin lines.

One of those has to work. Hope this helps.

  • 2
    I probably did not explain this very well, the problem was that there was a password set for the (my) administrative account, but I wasn't asked for it at login. I had to actively select and click on the account at the login screen so the account was not setup to auto-login. Hence your suggestion did not solve my particular problem. But thanks anyway. – T. N. Nov 4 '12 at 16:10

I know this is old, but I found the solution and want to share for future reference (this is the first page that comes up on Google for the question asked)

Go to "User and Groups" (not "User Accounts") and you will find the setting

open terminal

sudo gedit /etc/lightdm/lightdm.conf

should have gedit installed or you can use nano

sudo nano /etc/lightdm/lightdm.conf

just replace line

autologin-user=username

with

autologin-user=false

or

#autologin-user=username

save it and exit. Now it will ask for the password at startup screen.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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