Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-215

Cannot set local username and password for a Win32 service

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.7
    • 1.0.8
    • Procrun
    • None
    • win32 / server 2003

    Description

      installing a new service without supplying the --ServiceUser --ServicePassword installs the service correctly but using the LocalSystem account. If you want to use a local user, which of course has at least the "log on as a service" right, and supply the credentials via the parameters you get an error. To be more specific, in service.c line 211, the CHANGE_SERVICE macro fails with error 87L ERROR_INVALID_PARAMETER. This happens at least when creating and updating a service. Setting other options via this macro work fine, just the username password fail (standalone and in combination with other parameters).
      The solution is specifying SERVICE_WIN32_OWN_PROCESS as ServiceType parameter instead of SERVICE_NO_CHANGE in ChangeServiceConfigW line 27 second parameter.

      Attachments

        Activity

          People

            mturk@apache.org Mladen Turk
            wessels wessels
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified