| Author |
Message |
Stephen Fralich
Guest
|
Posted:
Fri Jan 07, 2005 4:51 am Post subject:
netsh and DHCP server |
|
|
If you type netsh /?, it says netsh has -u and -p options, username and
password respectively. It also as a -r option to execute netsh commands on a
remote server. Logged in as a non-domain user on a remote machine, I want to
be able to make changes to DHCP. I've tried the following:
netsh -r adserver -u domain\administrator -p password dhcp server show version
netsh -u domain\administrator -p password dhcp server \\adserver show version
Both of these produce:
Unable to determine the DHCP Server version for the Server 192.168.2.2.
Server may not function properly.
No matter what commands you send to the DHCP server, it always returns the
above error.
You can execute both the commands below successfully using runas:
netsh -r adserver dhcp server show version
netsh dhcp server \\adserver show version
I need to execute commands using a script though, so runas won't help. I
found a freeware program called CPAU (runas with password commandline
option), but it doesn't pass errors back through. Even if you have the wrong
password it exits 0 and returns "Command completed successfully."
Any suggestions about how to make netsh work properly remotely? Any other
ideas about how to accomplish what I want would be appreciated as well.
Thanks.
Stephen |
|
| Back to top |
|
 |
SubnetJO
Guest
|
Posted:
Fri Jan 07, 2005 11:15 pm Post subject:
RE: netsh and DHCP server |
|
|
Try using the SU command instead "runas".
RUnas work "online" only.
SU command is available after installed the "suss service" shipped with thw
windows resource kit.
The SU command works in "batch mode", and has a graphical interface, if you
want.
WARNING!
The SUSS shipped with the windows2000 server reskit has a bug recognized by
Microsoft.
If you want the fixed versione you have to contat MIcrosoft support (but you
must have subscribed a support contract).
Have a good luck!
I hope this can help.
Bye,
SubnetJO
Italy |
|
| Back to top |
|
 |
Shenan Stanley
Guest
|
Posted:
Sat Jan 08, 2005 1:19 am Post subject:
Re: netsh and DHCP server |
|
|
Stephen Fralich wrote:
| Quote: | If you type netsh /?, it says netsh has -u and -p options, username
and password respectively. It also as a -r option to execute netsh
commands on a remote server. Logged in as a non-domain user on a
remote machine, I want to be able to make changes to DHCP. I've
tried the following:
netsh -r adserver -u domain\administrator -p password dhcp server
show version netsh -u domain\administrator -p password dhcp server
\\adserver show version
Both of these produce:
Unable to determine the DHCP Server version for the Server
192.168.2.2. Server may not function properly.
No matter what commands you send to the DHCP server, it always
returns the above error.
You can execute both the commands below successfully using runas:
netsh -r adserver dhcp server show version
netsh dhcp server \\adserver show version
I need to execute commands using a script though, so runas won't
help. I found a freeware program called CPAU (runas with password
commandline option), but it doesn't pass errors back through. Even
if you have the wrong password it exits 0 and returns "Command
completed successfully."
Any suggestions about how to make netsh work properly remotely? Any
other ideas about how to accomplish what I want would be appreciated
as well. Thanks.
|
PSEXEC from sysinternals.
--
<- Shenan ->
--
The information is provided "as is", it is suggested you research for
yourself before you take any advice - you are the one ultimately
responsible for your actions/problems/solutions. Know what you are
getting into before you jump in with both feet. |
|
| Back to top |
|
 |
Stephen Fralich
Guest
|
Posted:
Sat Jan 08, 2005 4:43 am Post subject:
Re: netsh and DHCP server |
|
|
Unfortunately psexec sends the password as clear text, otherwise it looks good.
"Shenan Stanley" wrote:
| Quote: | Stephen Fralich wrote:
If you type netsh /?, it says netsh has -u and -p options, username
and password respectively. It also as a -r option to execute netsh
commands on a remote server. Logged in as a non-domain user on a
remote machine, I want to be able to make changes to DHCP. I've
tried the following:
netsh -r adserver -u domain\administrator -p password dhcp server
show version netsh -u domain\administrator -p password dhcp server
\\adserver show version
Both of these produce:
Unable to determine the DHCP Server version for the Server
192.168.2.2. Server may not function properly.
No matter what commands you send to the DHCP server, it always
returns the above error.
You can execute both the commands below successfully using runas:
netsh -r adserver dhcp server show version
netsh dhcp server \\adserver show version
I need to execute commands using a script though, so runas won't
help. I found a freeware program called CPAU (runas with password
commandline option), but it doesn't pass errors back through. Even
if you have the wrong password it exits 0 and returns "Command
completed successfully."
Any suggestions about how to make netsh work properly remotely? Any
other ideas about how to accomplish what I want would be appreciated
as well. Thanks.
PSEXEC from sysinternals.
--
- Shenan -
--
The information is provided "as is", it is suggested you research for
yourself before you take any advice - you are the one ultimately
responsible for your actions/problems/solutions. Know what you are
getting into before you jump in with both feet.
|
|
|
| Back to top |
|
 |
|
|
|
|