Author |
|
veptune
Joined: 07 Dec 2011 Posts: 9
|
Posted: Wed 07 Dec '11 11:56 Post subject: Start "httpd.exe -k install" with runas but doen't |
|
|
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
|
Posted: Wed 07 Dec '11 12:07 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:09 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:10 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:15 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:22 Post subject: |
|
|
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 |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Wed 07 Dec '11 12:28 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:33 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:42 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:44 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 12:46 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 13:05 Post subject: |
|
|
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 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 |
|