Topic: Script for get users Last Login
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.1
- Deployed with iRedMail Easy or the downloadable installer? Yes
- Linux/BSD distribution name and version: Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
Hello guys, im having a lot of troubles trying to get the LastLogin field using a script i cant found it i try many different ways but i dont know if is possible.
im trying to using something like this:
ldapsearch -x -h ldap:<host> -x -D "username" -y "password" -b 'dc=domain,dc=com' "(ObjectClass=shadowAccount)" mail lastLogin > users.csv
The objective is make a script that get users that has more than 90 days without last login
i appreciate any help thanks
----Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Stable release is out.