3.2.5.3.5 SASetNSAccountInformation (Opnum 1)
The SASetNSAccountInformation method MUST configure the credentials under which all ATSvc tasks run.
-
HRESULT SASetNSAccountInformation( [in, string, unique] SASEC_HANDLE Handle, [in, string, unique] const wchar_t* pwszAccount, [in, string, unique] const wchar_t* pwszPassword );
Handle: Pointer to a Unicode string that MUST specify the server. The client MUST map this string to an RPC binding handle. The server MUST ignore this parameter. For more details, see [C706] sections 4.3.5 and 5.1.5.2.
pwszAccount: MUST be a pointer to a string that specifies the account name.
pwszPassword: MUST be a pointer to a string that specifies the password for the named account. See section 5.1 for security considerations.
Upon receipt of the SASetNSAccountInformation call, the server MUST:
Return E_ACCESSDENIED if the caller does not have administrative privileges on the server.
If the pwszAccount parameter is NULL, store "LocalSystem" in the ATSvc account name conceptual data structure and return S_OK.<61>
Return the value 0x8007000D, which is the HRESULT form of the Win32 error ERROR_INVALID_DATA, if the pwszPassword parameter is longer than 127 characters.
Return the value 0x8007000D, which is the HRESULT form of the Win32 error ERROR_INVALID_DATA, if the pwszPassword parameter is NULL.<62>
Return E_ACCESSDENIED if the pwszPassword parameter is not valid for pwszAccount.<63>
Store the pwszAccount string in the ATSvc account name and add an entry to the credential store mapping from pwszAccount to pwszPassword.
If any errors are raised during the processing, they are returned. For more information about return codes, see section 2.3.14 and Win32 Error Codes in [MS-ERREF] section 2.1.