You are here

Generate Last Login REport

Submitted by newportal on Tue, 06/25/2013 - 00:55

Hello,

I'm trying to find out here if anybody has a script develop that are willing to share it. A script that can generate inactive employees and students with last login as part of the report?

Would appreciate any comments or suggestions.

Best Regards

Luminis Version:

Hi,

While I don't have a script handy to share I can provide a little information on how to put one together.

The data you're looking for can be pulled from the LDAP using a couple of custom-built filters and the ldapsearch utility. If you are not familiar with LDAP I would recommend you install a browser and poke around your Luminis TEST instance. You can also test your filters with a graphical LDAP browser before running them from the command line.

The user's role can be matched using the pdsRole attribute and their last login can be found using pdsLoginSuccess. The only tricky one is defining your criteria for an 'inactive' user. For example, is this someone who hasn't logged in for 6 months?

Hope that helps!

Tom

ldapsearch -b "ou=People,o=YourDomain.edu,o=cp" -D "cn=Directory Manager" -w - "(&(pdsRole=employee)(pdsLoginSuccess>=2013-06))"

Would pull a list of employees that have logged in this month.