Microsoft KB Archive/199202

{|
 * width="100%"|

INFO: Error 0xC0000187L When Using LSA APIs

 * }

Q199202

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * Microsoft Windows NT Server versions 3.5, 3.51, 4.0
 * Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0

-

SUMMARY
When you modify the Security Accounts Manager (SAM) database through the LSA APIs, you might get error code 0xC0000187L (STATUS_BACKUP_CONTROLLER). This error code means that the operation cannot be performed on a Backup Domain Controller (BDC).

0xC0000187L is defined in NTStatus.h included with the DDK. You can use the LsaNtStatusToWinError API to convert the LSA error codes to Win32 error codes.

MORE INFORMATION
This error occurs when you try to modify the SAM database on a BDC through LSA API such as LsaAddUserRights.

The SAM database on a BDC is a replicated copy of the SAM database on the Primary Domain Controller (PDC). The correct procedure is to modify the Accounts database on the PDC and then allow the database to replicate to the BDCs.

You can call NetGetDCName to get the PDC name.