screensaver doesn't lock with password prompt if password was just set
@segfault3
Submitted by segfault3 Link to original bug (#761969)
Description
If the screen is locked immediately after a password for the user was set, the screenlocker doesn't use the password and doesn't actually lock the screen. The screen turns black but on "waking up" it goes straight back to the desktop, skipping the GDM login screen.
How to reproduce:
execute as root to delete the password of the user
passwd -d user
execute as the user
echo -e "123456\n123456" | passwd && dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
Waiting 2 seconds between setting the password and locking the screen seems to be a workaround: echo -e "123456\n123456" | passwd && sleep 2 && dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
I encounter this on a Debian jessie system.
Why I want this to work (reliably): I'm writing a script to use with a Debian live system which should lock the screen. The user has no password set by default, so the script sets a password the first time it is executed and then locks the screen afterwards.
Version: 3.14.x