Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7560833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:00:20+00:00 2026-05-30T13:00:20+00:00

This is the same issue as in this thread: Security ID Structure Invalid ,

  • 0

This is the same issue as in this thread: Security ID Structure Invalid , Getting this error when setting the new SecurityDescriptor for AD user properties but I am using C++ instead of .Net.

I want to set the flag “User Cannot Change Password” for an Active Directory account. I am using this code from MS but get an error

The security ID structure is invalid.

This happens in the method SetUserCannotChangePassword() at this line:

//update the security descriptor property
hr = pads->Put(sbstrSecDesc, svar);

This error only happens when I test this from a computer that is not in the same domain as the user I want to set the AD flag. If I run my app on the same domain as I modify everything works fine.

Regarding this error code I found this article. The advice of opening the ports for LSA did not work – I deactivated the firewalls but that did not fix the problem.

And I only have that problem with setting this flag. Other flags as “UserMustChangePassword” are no problem.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:00:21+00:00Added an answer on May 30, 2026 at 1:00 pm

    I’m not sure this solves your problem, as the issue is most likely some kind of bug in the Microsoft framework.

    You refer that this bug only happens if you are executing this on a computer/user outside the domain you are currently changing, so you might try to establish a trusted connection to the Domain Server before executing your application.
    This may be done in many different ways, but the easiest is to mount the IPC$ hidden share on the domain controller as a Domain Admin. Just execute this on the command prompt:

    NET USE \\<DOMAIN-CONTROLER>\IPC$ /user:<DOMAIN-NAME>\<Domain-admin-user> <domain-admin-user-password>
    

    Again, it may or may not solve your problem, but it’s worth a shot 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this thread which basically has the same issue I have. But their
I have the same issue as in this post: http://social.microsoft.com/Forums/en-US/netfxbcl/thread/10027dd8-da47-4691-91a6-a8b89a7f514a Anyone know a possible
I posted this very same item on SERVERFAULT, but got no reply. So here
This is driving me nuts. I believe I asked this exact same question, but
The same as this question but for java Update Based on the comments and
I saw this same question for VIM and it has been something that I
I've asked this same question with Python. Now I like to know if this
This one boggles my mind. I've used this same script (different targets of course)
Whats this syntax useful for : function(String... args) Is this same as writing function(String[]
i am trying to automate the gui in c# .Is this same as browser

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.