Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Integer8ToTime ¶
Types ¶
type Ad ¶
type Ad struct { Name string `ldap:"name"` DistinguishedName string `ldap:"distinguishedName"` DnsName string `ldap:"dNSHostName"` Created time.Time `ldap:"whenCreated"` LastLogon time.Time `ldap:"lastLogon"` LastPassword time.Time `ldap:"pwdLastSet"` Description []string `ldap:"description"` Location string `ldap:"location"` ManagedBy string `ldap:"managedBy"` // This is returned by the computer object and used to query the related user ManagedByCn string `ldap:"cn"` // This is obtained by a second query for the managedBy user ManagedByGid string `ldap:"siemens-gid"` // This is obtained by a second query for the managedBy user ManagedByDepartment string `ldap:"department"` // This is obtained by a second query for the managedBy user Os string `ldap:"operatingSystem"` OsVersion string `ldap:"operatingSystemVersion"` ServicePrincipalName []string `ldap:"servicePrincipalName"` CriticalObject bool `ldap:"isCriticalSystemObject"` }
func AdodbQuery ¶
AdodbQuery queries the given Active Directory service with implicit Windows authentication and returns a pointer to a populated Ad struct. ATTENTION: Make sure searchCn / ldapAddress are sanitized if taken from user input, to avoid SQL injection attacks!
func LdapQuery ¶
func LdapQuery( logger utils.Logger, searchCn string, ldapAddress string, ldapPort int, ldapUser string, ldapPassword string, dialTimeout time.Duration, ) *Ad
LdapQuery queries the given Active Directory service with explicit authentication and returns a pointer to a populated Ad struct. ATTENTION: Make sure searchCn / ldapAddress are sanitized if taken from user input, to avoid SQL injection attacks!
Click to show internal directories.
Click to hide internal directories.