Posted on 02-21-2018 09:36 AM
We require users to logout after they are done with their work for the day. However, as everyone knows, Mac users do not always logout.
Is there an extension attribute that can be used to collect info for "no logout in X number of days"
Thanks! Corbin
Posted on 02-21-2018 10:14 AM
You can probably do something with
last $username | grep console
Posted on 02-21-2018 10:21 AM
There might be a better way, but the last
command will show something like still logged in
to the right of any accounts that haven't logged out yet. The problem is the date format is kinda lame, as it might show it something like Wed Feb 14 23:05
, which isn't the most helpful output.
Anyway, try playing around withlast -t console | awk '/still logged in/{print $1,$3,$4,$5,$6}'