INFO: Need To Call NetUserModalsGet Between Impersonated Net API Sessions (224582)
The information in this article applies to:
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Workstation 4.0
This article was previously published under Q224582 SUMMARY
The NetUser, NetGroup, and NetLocalGroup APIs cache a security accounts manager (SAM) context handle to a named server. If you need to call these Net APIs under different impersonation credentials for the named server, then flush that SAM handle between the impersonation sessions. The best way to do this is to call NetUserModalsGet passing NULL as the first parameter. Although only members of the administrators or account operators local group can successfully execute NetUserModalsGet, calling NetUserModalsGet from any user context always flushes the SAM handle regardless of whether the NetUserModalsGet call returns successful.
Modification Type: | Minor | Last Reviewed: | 2/12/2004 |
---|
Keywords: | kbDSWNET2003Swept kbinfo KB224582 |
---|
|