Cannot attach to services manager (Unable to add user)

Posted on 2009-02-14
Last Modified: 2013-12-17
I have a C# program that uses Firebird.  I just installed 2.0.5, and now it's telling me that the user doesn't exist (it must have replaced the Security2.fdb file).  From the C# program, I used to be able to issue a command "gsec.exe -add userx -password xyz, but now it tells me "cannot attach to services manager" (I checked and the Firebird server is running).

If I run "gsec -user SYSDBA -password masterkey" from a command prompt, the gsec program starts and I can then enter the new user.  But I have to be able to do this from within my C# program, because the user of the program will not be able to do this.

Any ideas on how to fix this?
Question by:rmmarsh
    LVL 19

    Assisted Solution

    you are right about the security file being replaced on install, what happens if you run "gsec.exe -add userx -password xyz" on a commandline

    Author Comment

    It works on the command line... I need to be able to do this programmatically from the C# program... I thought if I started gsec with user = sysdba and then on the same line added the user it might work, but gsec doesn't like that...
    LVL 19

    Accepted Solution

    I don't know c# but I'd expect it to have a way to use the services api directly

    Author Comment

    Hmmm... I'll look into the API... thanks...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now