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.
 
 
 
Categories: Uncategorized
  1. Bewin's avatar
    Bewin
    September 21, 2011 at 2:23 pm

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

    Like

  2. Lee's avatar
    Lee
    January 19, 2012 at 2:25 pm

    Many thanks for your top tip.
    Lee

    Like

  3. Juan's avatar
    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's avatar
    Nuno vaz dos Ramos
    November 18, 2012 at 7:16 am

    Worked like a bomb……SWEEEEETTTTTT!!!

    Like

  5. Edwin's avatar
    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's avatar
    TS
    February 26, 2014 at 3:45 pm

    Thanks for your tip. It’ s worked 🙂

    Like

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

    Thank you brother. You saved my weekend.

    Like

  1. No trackbacks yet.

Leave a reply to Lee Cancel reply