Hello,
How can I get the screen lock and unlock time in Centos 7
Is secure log contained the information for the same?
"first successful unlock timing of every logged user" is what I am looking for.
Screen Lock and unlock time
Re: Screen Lock and unlock time
Is there a chance to clarify the setup you may have for users? I'm a little confused on the, "first successful unlock timing of every logged user" part.
Does "every logged user" indicate the system in question has multiple ssh connections coming in or are you running some "linux terminal server"/RDP/VNC/NX connections or is what you are asking about just a workstation with one or more users logged in?
For simple ssh connections, I don't know of a "lock" per-say, but the "last" command does give login/logout info.
For Linux workstation and a GUI session that gets more "fun" since I don't know if that information is actually stored/logged anywhere for past reporting purposes (maybe a more knowledgeable person can help provide this). However, the current user state can be evaluated with the "loginctl" command via two parts:
This provides the list of logged in users (ignore the "gdm" user):
Then use the session number to get the "Idle*" or "Locked*" information from:
The beginnings of a scripted version could be like:
Does "every logged user" indicate the system in question has multiple ssh connections coming in or are you running some "linux terminal server"/RDP/VNC/NX connections or is what you are asking about just a workstation with one or more users logged in?
For simple ssh connections, I don't know of a "lock" per-say, but the "last" command does give login/logout info.
For Linux workstation and a GUI session that gets more "fun" since I don't know if that information is actually stored/logged anywhere for past reporting purposes (maybe a more knowledgeable person can help provide this). However, the current user state can be evaluated with the "loginctl" command via two parts:
This provides the list of logged in users (ignore the "gdm" user):
Code: Select all
loginctl list-sessions
SESSION UID USER SEAT TTY
2 1001 USERX seat0 tty2
c1 42 gdm seat0 tty1
Code: Select all
loginctl --no-pager -a show-session 2
Code: Select all
for session in $(loginctl --no-legend list-sessions | grep -v gdm | awk '{print $1}'); do
loginctl --no-pager -a show-session $session ...
Re: Screen Lock and unlock time
Thanks for the reply buddy,
Q Is there a chance to clarify the setup you may have for users?
After connecting to a VPN, through Teradici application user is able to log in to their dedicated Linux system
Now every day at what time user logs in or unlock the screen as he already logged in that I want to know.
Q Is there a chance to clarify the setup you may have for users?
After connecting to a VPN, through Teradici application user is able to log in to their dedicated Linux system
Now every day at what time user logs in or unlock the screen as he already logged in that I want to know.