1

I am trying to lock my system, but it seems like though it is locking but it is not asking for password to login.

Even when I changed setting from Settings > User Account and rebooted my system the password is by-passed.

I tried everything, but don't know which setting is causing this problem. If anyone can help with this?

2 Answers2

1

I found my answer here. Since these questions have different phrases I thought of not deleting my question. This might help somebody else.

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 from those lines and save.

Restart the computer and now it should ask for the password again!

1

Run the following command from your terminal:

sudo gpasswd -d $USER nopasswdlogin 

It should solve your problem.

Ayan
  • 111