Likewise Security and Authentication Subsystem
|
AD Provider client API. More...
Functions | |
DWORD | LsaAdJoinDomain (HANDLE hLsaConnection, PCSTR pszHostname, PCSTR pszHostDnsDomain, PCSTR pszDomain, PCSTR pszOU, PCSTR pszUsername, PCSTR pszPassword, PCSTR pszOSName, PCSTR pszOSVersion, PCSTR pszOSServicePack, LSA_NET_JOIN_FLAGS dwFlags) |
Join an Active Directory domain. More... | |
DWORD | LsaAdJoinDomainDn (IN HANDLE hLsaConnection, IN PCSTR pHostname, IN PCSTR pHostDnsDomain, IN PCSTR pDomain, IN PCSTR pOu, IN PCSTR pUsername, IN PCSTR pPassword, IN PCSTR pOsName, IN PCSTR pOsVersion, IN PCSTR pOsServicePack, IN LSA_NET_JOIN_FLAGS dwFlags) |
Join Active Directory domain with alternate OU syntax. More... | |
DWORD | LsaAdJoinDomainUac (HANDLE hLsaConnection, PCSTR pszHostname, PCSTR pszHostDnsDomain, PCSTR pszDomain, PCSTR pszOu, PCSTR pszUsername, PCSTR pszPassword, PCSTR pszOSName, PCSTR pszOSVersion, PCSTR pszOSServicePack, LSA_NET_JOIN_FLAGS dwFlags, LSA_USER_ACCOUNT_CONTROL_FLAGS dwUac) |
Join Active Directory domain with userAccountControl flags. More... | |
DWORD | LsaAdLeaveDomain (HANDLE hLsaConnection, PCSTR pszUsername, PCSTR pszPassword) |
Leave default Active Directory domain. More... | |
DWORD | LsaAdLeaveDomain2 (HANDLE hLsaConnection, PCSTR pszUsername, PCSTR pszPassword, PCSTR pszDomain, LSA_NET_JOIN_FLAGS dwFlags) |
Leave Active Directory domain. More... | |
DWORD | LsaAdSetDefaultDomain (IN HANDLE hLsaConnection, IN PCSTR pszDomain) |
Set default Active Directory domain. More... | |
DWORD | LsaAdGetJoinedDomains (IN HANDLE hLsaConnection, OUT PDWORD pdwNumDomainsFound, OUT PSTR **pppszJoinedDomains) |
Get joined domain list. More... | |
typedef DWORD | LSA_NET_JOIN_FLAGS |
Domain join flags. More... | |
This module provides functions to communicate directory with the lsass Active Directory provider.
typedef DWORD LSA_NET_JOIN_FLAGS |
Encodes additional options when joining a domain
DWORD LsaAdJoinDomain | ( | HANDLE | hLsaConnection, |
PCSTR | pszHostname, | ||
PCSTR | pszHostDnsDomain, | ||
PCSTR | pszDomain, | ||
PCSTR | pszOU, | ||
PCSTR | pszUsername, | ||
PCSTR | pszPassword, | ||
PCSTR | pszOSName, | ||
PCSTR | pszOSVersion, | ||
PCSTR | pszOSServicePack, | ||
LSA_NET_JOIN_FLAGS | dwFlags | ||
) |
Instructs the AD provider to join the computer to an Active Directory domain. If already joined, and #LW_NET_JOIN_DOMAIN_MULTIPLE is not specified, the AD provider will first leave the default domain.
[in] | hLsaConnection | a connection handle |
[in] | pszHostname | the computer name to join with |
[in] | pszHostDnsDomain | the DNS domain name of the computer |
[in] | pszDomain | the fully-qualified domain name to join |
[in] | pszOU | an optional OU (organizational unit) to join, specified as forward-slash separated components |
[in] | pszUsername | the name of an AD user with permission with permission to join computers to the target domain |
[in] | pszPassword | the password for the user |
[in] | pszOSName | the operating system name to set on the computer object |
[in] | pszOSVersion | the operating system version to set on the computer object |
[in] | pszOSServicePack | the service pack level to set on the computer object |
[in] | dwFlags | additional flags to control join behavior |
LW_ERROR_SUCCESS | success |
DWORD LsaAdJoinDomainDn | ( | IN HANDLE | hLsaConnection, |
IN PCSTR | pHostname, | ||
IN PCSTR | pHostDnsDomain, | ||
IN PCSTR | pDomain, | ||
IN PCSTR | pOu, | ||
IN PCSTR | pUsername, | ||
IN PCSTR | pPassword, | ||
IN PCSTR | pOsName, | ||
IN PCSTR | pOsVersion, | ||
IN PCSTR | pOsServicePack, | ||
IN LSA_NET_JOIN_FLAGS | dwFlags | ||
) |
Identical to LsaAdJoinDomain(), but accepts a raw LDAP DN (distinguished name) for the OU to join.
[in] | hLsaConnection | a connection handle |
[in] | pHostname | the computer name to join with |
[in] | pHostDnsDomain | the DNS domain name of the computer |
[in] | pDomain | the fully-qualified domain name to join |
[in] | pOu | an optional OU (organizational unit) to join specified as a DN. |
[in] | pUsername | the name of an AD user with permission with permission to join computers to the target domain |
[in] | pPassword | the password for the user |
[in] | pOsName | the operating system name to set on the computer object |
[in] | pOsVersion | the operating system version to set on the computer object |
[in] | pOsServicePack | the service pack level to set on the computer object |
[in] | dwFlags | additional flags to control join behavior |
LW_ERROR_SUCCESS | success |
DWORD LsaAdJoinDomainUac | ( | HANDLE | hLsaConnection, |
PCSTR | pszHostname, | ||
PCSTR | pszHostDnsDomain, | ||
PCSTR | pszDomain, | ||
PCSTR | pszOu, | ||
PCSTR | pszUsername, | ||
PCSTR | pszPassword, | ||
PCSTR | pszOSName, | ||
PCSTR | pszOSVersion, | ||
PCSTR | pszOSServicePack, | ||
LSA_NET_JOIN_FLAGS | dwFlags, | ||
LSA_USER_ACCOUNT_CONTROL_FLAGS | dwUac | ||
) |
Identical to LsaAdJoinDomain(), but allows passing User-Account-Control flag values.
[in] | hLsaConnection | a connection handle |
[in] | pszHostname | the computer name to join with |
[in] | pszHostDnsDomain | the DNS domain name of the computer |
[in] | pszDomain | the fully-qualified domain name to join |
[in] | pszOu | an optional OU (organizational unit) to join specified as a DN |
[in] | pszUsername | the name of an AD user with permission with permission to join computers to the target domain |
[in] | pszPassword | the password for the user |
[in] | pszOSName | the operating system name to set on the computer object |
[in] | pszOSVersion | the operating system version to set on the computer object |
[in] | pszOSServicePack | the service pack level to set on the computer object |
[in] | dwFlags | additional flags to control join behavior |
[in] | dwUac | additional user account control flags |
LW_ERROR_SUCCESS | success |
DWORD LsaAdLeaveDomain | ( | HANDLE | hLsaConnection, |
PCSTR | pszUsername, | ||
PCSTR | pszPassword | ||
) |
Leaves the currently-joined default AD domain.
[in] | hLsaConnection | a connection handle |
[in] | pszUsername | an optional name of a user with permissions to disable the machine account in AD |
[in] | pszPassword | an optional password for the provided user |
LW_ERROR_SUCCESS | success |
DWORD LsaAdLeaveDomain2 | ( | HANDLE | hLsaConnection, |
PCSTR | pszUsername, | ||
PCSTR | pszPassword, | ||
PCSTR | pszDomain, | ||
LSA_NET_JOIN_FLAGS | dwFlags | ||
) |
Leaves a currently-joined AD domain. This function supports leaving a specific domain when multiple domains are joined and additional flags to control leave behavior.
[in] | hLsaConnection | a connection handle |
[in] | pszUsername | an optional name of a user with permissions to disable the machine account in AD |
[in] | pszPassword | an optional password for the provided user |
[in] | pszDomain | the domain to leave |
[in] | dwFlags | additional leave flags |
LW_ERROR_SUCCESS | success |
DWORD LsaAdSetDefaultDomain | ( | IN HANDLE | hLsaConnection, |
IN PCSTR | pszDomain | ||
) |
Sets the default AD domain.
[in] | hLsaConnection | a connection handle |
[in] | pszDomain | the domain |
LW_ERROR_SUCCESS | success |
DWORD LsaAdGetJoinedDomains | ( | IN HANDLE | hLsaConnection, |
OUT PDWORD | pdwNumDomainsFound, | ||
OUT PSTR ** | pppszJoinedDomains | ||
) |
Gets a list of joined domains. Free the result with LwFreeStringArray().
[in] | hLsaConnection | a connection handle |
[out] | pdwNumDomainsFound | set to the number of joined domains |
[out] | pppszJoinedDomains | set to the list of joined domains |
LW_ERROR_SUCCESS | success |