cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2895
Views
30
Helpful
1
Comments
Tirtha Tripathy
Cisco Employee
Cisco Employee

All Info from userid1
run sql select * from enduser where userid='userid1'

 

userid selective info for multiple users
run sql select eu.userid,eu.islocaluser,eu.status, eu.mailid, eu.directoryuri, dpc.name as ad_filter from enduser eu left join directorypluginconfig dpc on eu.fkdirectorypluginconfig = dpc.pkid where eu.status=1 and dpc.name="LDAP_Directory" and userid='userid1' or mailid='a@c.com'

 

total_users_clusterwide
run sql select count (*) as total_users_clusterwide from enduser

 

active_ldap_users_clusterwide
run sql select count (*) as active_ldap_users_clusterwide from enduser where status = '1'

 

inactive_users_clusterwide
run sql select count (*) as inactive_users_clusterwide from enduser where status = 2

 

clusterwide_inactive_active_total_users
run sql select count (userid) as clusterwide_inactive_active_total_users from enduser where status = '1' union select count (*) as inactive_users_clusterwide from enduser where status = 2 union select count (*) as total_users_clusterwide from enduser

 

total_users_clusterwide from enduser

Count of Active Users and LDAP_Directory
run sql select dpc.name as ldap_directory_name, count (*) as no_of_active_users_in_directory from enduser eu left join directorypluginconfig dpc on eu.fkdirectorypluginconfig = dpc.pkid where eu.status=1 and dpc.name="LDAP_Directory" group by dpc.name

 

Count of InActive Users and LDAP_Directory
run sql select dpc.name as ldap_directory_name, count (*) as no_of_inactive_users_in_directory from enduser eu left join directorypluginconfig dpc on eu.fkdirectorypluginconfig = dpc.pkid where eu.status=2 and dpc.name="LDAP_Directory" group by dpc.name

 

LDAP Directory and their counts
run sql select directorypluginconfig.name, count(directorypluginconfig.name) as no_of_users from enduser eu left join directorypluginconfig directorypluginconfig on eu.fkdirectorypluginconfig = directorypluginconfig.pkid group by directorypluginconfig.name order by directorypluginconfig.name

 

LDAP Directory and their schedules
run sql select pkid,nextexectime from directorypluginschedule

 

LDAP Directory and their schedules and detailed info
run sql select directorypluginconfig.name as ldap_directory_name,directorypluginconfig.syncnow as syncnow, directorypluginconfig.fullsyncstatus as sync_status, directorypluginconfig.connectedldaphost as ldap_hostname, directorypluginschedule.nextexectime as sync_schedule, ldapfilter.filter as ldap_filter from directorypluginconfig join directorypluginschedule on directorypluginconfig.pkid = directorypluginschedule.fkdirectorypluginconfig join ldapfilter on directorypluginconfig.fkldapfilter = ldapfilter.pkid order by directorypluginconfig.name

 

convert ldap user to manual
run sql update enduser set fkdirectorypluginconfig=NULL where userid=’userid2′

Comments
JonesR
Level 1
Level 1

This is amazing, What would i need to run to get an output of Enabled Local User we have, with user ID and DN?

Thanks!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: