Home > Uncategorized > No mapping between account names and security IDs

No mapping between account names and security IDs

When installing a windows service, using installutil, it prompted for a username, and password, and
since my Administrator user didn’t have a password, I got the following error:
 
System.ComponentModel.Win32Exception: No mapping between account names and security IDs was done
 
After reading a few posts, I found a handy tip to solve this
 
Add this to the ProjectInstaller.cs file (in InitializeComponent)
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
 
Et viola, it installs without prompting for a password.
 
 
 
Advertisement
Categories: Uncategorized
  1. Bewin
    September 21, 2011 at 2:23 pm

    Thanks, Thanks, Thanks, Thanks, Thanks… You have made my day.

    Like

  2. Lee
    January 19, 2012 at 2:25 pm

    Many thanks for your top tip.
    Lee

    Like

  3. Juan
    March 13, 2012 at 7:39 pm

    If you enter this line of code, you can take out this other two..

    “this.serviceProcessInstaller.User”
    “this.serviceProcessInstaller.Password”

    Really good tip!!!

    Like

  4. Nuno vaz dos Ramos
    November 18, 2012 at 7:16 am

    Worked like a bomb……SWEEEEETTTTTT!!!

    Like

  5. Edwin
    March 20, 2013 at 1:15 pm

    Thanks for your tip and to Juan as well 🙂 This saved me a lot of head scratching!

    Like

  6. TS
    February 26, 2014 at 3:45 pm

    Thanks for your tip. It’ s worked 🙂

    Like

  7. Sudheer Kumar
    November 25, 2016 at 2:10 pm

    Thank you brother. You saved my weekend.

    Like

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: