#!/bin/sh # PAM check for howdy-settings: succeed only when the user has a locked session, # so face authentication is offered on the lock screen and not at first login. for s in $(loginctl show-user "$PAM_USER" -p Sessions --value 2>/dev/null); do [ "$(loginctl show-session "$s" -p LockedHint --value)" = yes ] && exit 0 done exit 1