How to generate user reports as CSV files in Ezeelogin?
How to generate reports as CSV files for Ezeelogin user's to access remote servers?
Running the below scripts will prompt for the Ezeelogin administrator password. Ezeelogin administrator password (super admin user) is the password of the user created at the time of installation.
1. Run the following script to generate reports for all users.
[email protected]:# php /usr/local/ezlogin/eztool.php -user_report -out filename.csv
[email protected]:# php /usr/local/ezlogin/eztool.php -user_report username -out filename.csv
[email protected]:# php /usr/local/ezlogin/eztool.php -user_report username1,username2 -out filename.csv
[email protected]:# php /usr/local/ezlogin/eztool.php -user_report -out allreport.csv
#########################
# Ezeelogin Tool #
#########################
Checking environment... The memory limit is less than 4 GB. If the script crashes abruptly without any errors, try increasing the PHP memory limit.
done (1736)
Checking license... done (1991)
Enter the Ezeelogin administrator password: Admin!2345
[email protected]:# cat allreport.csv
username,firstname,lastname,email,usergroup,status,last_login_at,last_login_from,user_created,user_expiry,servername,IP,description,servergroup,ssh_user
admin,Administrator,,,Admins,Active,"2021-12-10 04:50:15",192.168.29.29,"2021-12-01 06:26:09",Never,gw.ezee.co,192.168.29.178,,linux-servers,tech
admin,Administrator,,,Admins,Active,"2021-12-10 04:50:15",192.168.29.29,"2021-12-01 06:26:09",Never,sub-jake-linu16,192.168.29.254,,linux-servers,root
admin,Administrator,,,Admins,Active,"2021-12-10 04:50:15",192.168.29.29,"2021-12-01 06:26:09",Never,Ad-wind-RDP,192.168.29.79,,RDP-machine,Administrator
monica,monica,,[email protected],Dummy,Active,"2021-12-01 07:29:04",127.0.0.1,"2021-12-01 07:27:47",Never,gw.ezee.co,192.168.29.178,,linux-servers,jake
monica,monica,,[email protected],Dummy,Active,"2021-12-01 07:29:04",127.0.0.1,"2021-12-01 07:27:47",Never,sub-jake-linu16,192.168.29.254,,linux-servers,jake
decker,decker,,[email protected],Dummy,Active,"2021-12-01 07:46:24",127.0.0.1,"2021-12-01 07:31:44",Never,sub-jake-linu16,192.168.29.254,,linux-servers,root
The following example shows how to view the list of servers that a user has.
[email protected]:# php /usr/local/ezlogin/eztool.php -user_report ezadmin -out ezadmin_report.csv
[email protected]:# cat ezadmin_report.csv
username,firstname,lastname,email,usergroup,status,last_login_at,last_login_from,user_created,user_expiry,servername,ip,description,servergroup,ssh_user
ezadmin,Administrator,,,Admins,Active,"2022-12-08 06:44:01",192.168.1.3,"2022-12-06 11:12:30",Never,centos.server,192.168.1.2,,production.server,root
ezadmin,Administrator,,,Admins,Active,"2022-12-08 06:44:01",192.168.1.3,"2022-12-06 11:12:30",Never,ubuntu.server,192.168.1.1,,production.server,root