Finding users that haven't logged in since X

Posted on

I would like to set up a report that will list users (excluding system accounts) that haven't logged in for, say, 180 days, and the lastlog command looks promising.

The report could be as simple as user, last log date, last log time.

Any/all suggestions are appreciated.