logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Start "httpd.exe -k install" with runas but doen't
Author
veptune



Joined: 07 Dec 2011
Posts: 9

PostPosted: Wed 07 Dec '11 11:56    Post subject: Start "httpd.exe -k install" with runas but doen't Reply with quote

Hello,

I just get :
Attempting to start ./httpd.exe -k install as user "machine\user" ...

And the service is not created ...

I don't see Apache in service list, and the apache monitor see nothing.

Nothing in apache logs or event viewer.

My server is windows 2008 web edition.

When i start httpd.exe, everything works fine, apache run correcly.

Strange

Any idea ?

Thanks
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 07 Dec '11 12:07    Post subject: Reply with quote

To install the service, did you used the command httpd.exe -k install in a Dos window ?

And when you use that command, what do you get ?


Steffen
Back to top
veptune



Joined: 07 Dec 2011
Posts: 9

PostPosted: Wed 07 Dec '11 12:09    Post subject: Reply with quote

Yes sure i use a dos prompt

I also use the "PowerShell" but i got the same message
Back to top
veptune



Joined: 07 Dec 2011
Posts: 9

PostPosted: Wed 07 Dec '11 12:10    Post subject: Reply with quote

If i don t use runas, i got :

(OS 5)Access is denied. : Failed to open the WinNT service manager

This is normal, as i saw on this forum, that's why i use runas
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 07 Dec '11 12:15    Post subject: Reply with quote

As asked what response you get after you enter httpd.exe -k install at the dos prompt, you not clear above ? I assume you run it as administrator.

Steffen
Back to top
veptune



Joined: 07 Dec 2011
Posts: 9

PostPosted: Wed 07 Dec '11 12:22    Post subject: Reply with quote

PS C:\apache2\bin> runas /noprofile /user:root "./httpd.exe -k install"
Enter the password for root:
Attempting to start ./httpd.exe -k install as user "machine\root" ...
PS C:\apache2\bin>

that's all Sad
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 07 Dec '11 12:28    Post subject: Reply with quote

Here I just:

Run cmd.exe as administrator and dos window appears.
Type in dos window httpd.exe -k install and service is installed.

Steffen
Back to top
veptune



Joined: 07 Dec 2011
Posts: 9

PostPosted: Wed 07 Dec '11 12:33    Post subject: Reply with quote

If i do :
runas /noprofile /user:root "cmd"

I got my admin prompt, but when i do httpd -k install i still get

C:\Apache2\bin>httpd.exe -k install
Installing the Apache2.2 service
(OS 5)Access is denied. : Failed to open the WinNT service manager

This is strange because, the title of dos windows is "cmd (running as machine\root)

So i should not get this message, as the dos window is run as administrator
Back to top
veptune



Joined: 07 Dec 2011
Posts: 9

PostPosted: Wed 07 Dec '11 12:42    Post subject: Reply with quote

OK it works.

I did what you say.

Find cmd.exe and right click to select run as administrator

thanks

I thought "runas" was the same ...
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 07 Dec '11 12:44    Post subject: Reply with quote

I am not aware of account/user root, only Administator here in 2008.

I think you should check your accounts.

Steffen
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 07 Dec '11 12:46    Post subject: Reply with quote

I missed your post, perfect that it is working now.

Steffen
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 07 Dec '11 13:05    Post subject: Reply with quote

veptune wrote:
OK it works.

I did what you say.

Find cmd.exe and right click to select run as administrator

thanks

I thought "runas" was the same ...


it is the same, but with run as you just run cmd.exe as Administrator, not httpd.exe. runas takes only a single process. So it would make sence to open cmd.exe and in that box you run
Code:

 runas /noprofile /user:root httpd -k install


Using the context menu run as Adminstator is a bit different Windows thing, but more comfortable Wink As Steffen wrote there is might be a persmission problem that your root user is not allowed to install a service. Not sure about that.
Back to top


Reply to topic   Topic: Start "httpd.exe -k install" with runas but doen't View previous topic :: View next topic
Post new topic   Forum Index -> Apache