Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   Remote Server Shutdown (https://www.cableforum.uk/board/showthread.php?t=31637)

Raistlin 09-07-2005 01:50

Remote Server Shutdown
 
Is there anyway I can remotely shut down a server running Windows Server 2003?

The box is wired to my router which is then wirelessly connected to my laptop.

I know that when I shut the server down normally I have to put in a reason for it being shutdown.

What I'd like to be able to do is send a command from the laptop that just shuts the server down straight away.

Anybody know if this can be done?

Jon M 09-07-2005 02:04

Re: Remote Server Shutdown
 
if the laptop is XP you can use:

shutdown /r /m \\servername

in the "run" prompt

add the switch "/f" if you want to force all programs to close immeadiately
__________________

all switches work equally well with a dash, -m, -f, -r etc.

Raistlin 09-07-2005 02:05

Re: Remote Server Shutdown
 
Ok, tried that.

I keep getting an Access Denied message.

I can ping the server ok though so it doesn't appear to be a connectivity problem.

Jon M 09-07-2005 02:07

Re: Remote Server Shutdown
 
put "shutdown /?" into a command prompt for a full list of available switches

Raistlin 09-07-2005 02:07

Re: Remote Server Shutdown
 
Do I need to supply a reason code ( /d )?

It normally asks for a reason when I shut down from the server.

Ohhh..... Thinking about it, my account on the Laptop doesn't have Admin rights on the server, could that be it?

Jon M 09-07-2005 02:08

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
Ok, tried that.

I keep getting an Access Denied message.

I can ping the server ok though so it doesn't appear to be a connectivity problem.

are you logged in with a recognised admin account from the servers point of view?

Raistlin 09-07-2005 02:09

Re: Remote Server Shutdown
 
Quote:

Originally Posted by s1lv3r
are you logged in with a recognised admin account from the servers point of view?

I don't think I am actually, and I can't see a switch that will allow me to specify an Admin account either.

Jon M 09-07-2005 02:11

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
Thinking about it, my account on the Laptop doesn't have Admin rights on the server, could that be it?

;), we both wrote about that at the same time. ;)

yes, you will need admin rights
__________________

just imagine if M$ had created a Server OS you could shut down remotely without admin rights.. lol, it would be an sysadmin's worst nightmare

Raistlin 09-07-2005 02:12

Re: Remote Server Shutdown
 
Is there any way that I can run the shutdown command AS another user (ie as an Admin acount from the Server)?

I know the Username and Password.
__________________

Quote:

Originally Posted by s1lv3r
just imagine if M$ had created a Server OS you could shut down remotely without admin rights.. lol, it would be an sysadmin's worst nightmare

TBH I'm suprised that they haven't ;)

Jon M 09-07-2005 02:17

Re: Remote Server Shutdown
 
can't you add your laptop account as an admin on the server?

Raistlin 09-07-2005 02:19

Re: Remote Server Shutdown
 
I could do, I was trying to resist doing that though as I didn't want the profile that I'm logged in as at the moment to be continually connected to the server with Admin rights.

I suppose that's the only way I'm going to be able to do it though.

Stuart 09-07-2005 02:19

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
Is there any way that I can run the shutdown command AS another user (ie as an Admin acount from the Server)?

I know the Username and Password.
__________________

Quote:

Originally Posted by s1lv3r
just imagine if M$ had created a Server OS you could shut down remotely without admin rights.. lol, it would be an sysadmin's worst nightmare

TBH I'm suprised that they haven't ;)

To run any command as another user, use the "Runas" command. The format is
Quote:

runas /user:domain\username /pass:password "command.exe par1 par2 par3"
where "domain" is the either the name of the domain, or the name of the remote server. Username and password should be obvious. Substitute the actual program for "command.exe" and it's parameters for "par1","par2" and "par3"

Bear in mind that the program uses the account you specify, so if you specify account that doesn't have access to your local system, you might run into problems.

Jon M 09-07-2005 02:24

Re: Remote Server Shutdown
 
nice one stu :tu: I was hitting google while you typed that

Raistlin 09-07-2005 02:31

Re: Remote Server Shutdown
 
Still can't get it to work, I keep getting a message that the login/password is incorrect.

I know that both are right, so I'm not sure what's going on.

I think this might be a topic that I have to have another look at in the morning, my eyelids are starting to close now.

Thanks for the help tonight guys.

Richard M 09-07-2005 02:32

Re: Remote Server Shutdown
 
In other news, Windows users discover sudo.

Raistlin 09-07-2005 02:36

Re: Remote Server Shutdown
 
Is that before, or after, they've uninstalled FF and gone back to IE ( ;) )?

Graham 09-07-2005 02:42

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
I keep getting an Access Denied message.

Are you running a Firewall that could block access?

Raistlin 09-07-2005 02:45

Re: Remote Server Shutdown
 
I can successfully ping the server so I don't think a firewall is the issue, all other connectivity is fine.

I think it's something to do with the way that the local machine's account is set up.

I'm going to go through the server settings tomorrow when I get a chance and make sure I haven't missed anything obvious when I've set the accounts up.

greencreeper 09-07-2005 10:38

Re: Remote Server Shutdown
 
We have a thing called "shutgui" that closes servers remotely when they're stuffed. It only works if you first map a drive to the server, and supply the administrator username/password...

Oh and instead of domain, you can use the server name in scastle's runas command.

Gareth 09-07-2005 18:03

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Richard M
In other news, Windows users discover sudo.

*cough* Windows Resource Kit *cough* Admittedly they've just taken the best unix commands (ps, su, grep, etc...) and written Windows versions, but at least you can at last do some useful stuff from the commadn line.
__________________

By the way, have a look at this which you might find easier than the bog-standard Windows commands ;)
__________________

Oh, and Sysinternals software rocks and everyone should have a look at their site cause they've got so much cool stuff for all sorts of situations.. and it's free :tu: :)

iron25 09-07-2005 23:15

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
I know that when I shut the server down normally I have to put in a reason for it being shutdown.

You do know that you can turn this rather annoying feature off.

greencreeper 09-07-2005 23:21

Re: Remote Server Shutdown
 
Quote:

Originally Posted by iron25
You do know that you can turn this rather annoying feature off.

<*****s up ears>

[edit] The filtered word starts with p and has rick after it.

Raistlin 10-07-2005 21:43

Re: Remote Server Shutdown
 
Quote:

Originally Posted by iron25
Quote:

Originally Posted by Raistlin
I know that when I shut the server down normally I have to put in a reason for it being shutdown.

You do know that you can turn this rather annoying feature off.

I didn't know that, I'm assuming that this will be a registry tweak.

My ears are *****ed up as well.....

[edit] The filtered word starts with p and has rick after it.

iron25 10-07-2005 22:12

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
I didn't know that, I'm assuming that this will be a registry tweak.

My ears are *****ed up as well.....

[edit] The filtered word starts with p and has rick after it.

Go here http://www.msfn.org/win2k3/shutdown.htm but if you go to the first page http://www.msfn.org/win2k3/ there might be a few more tips that you could use.

Raistlin 10-07-2005 22:21

Re: Remote Server Shutdown
 
ooooh.

Good site, thanks :)


All times are GMT. The time now is 09:29.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum