Remote Shutdown - Access Denied

skyevision

New Member
Joined
Jan 21, 2008
Messages
8
Hi there,

I played around with the Shutdown command in CMD on my XP Pro SP3 machine and did the following:

C:\Documents and Settings\Desktop>shutdown -i (which opens the GUI)

Entered another computer's name (on our private home network) in the dialog box and selected Shutdown. Doing that I managed to remotely shutdown a computer on our network.

I did this for 2 or 3 times to test reboot, shutdown, etc. After a while I tried to shutdown the same computer again and got the following error (this after I managed to shutdown this pc about 30 min ago using same method):

C:\Documents and Settings\Desktop>shutdown -i
Access is denied.
Failed: desktop2


The thing is, nothing has changed within the 30 minutes I first managed to shutdown the computer. Is it possible that I could be locked out because I shutdown the computer with the CMD command numerous times? And if yes, is it possible to allow the "other" computer to shutdown that PC again?

I'm doing something wrong somewhere, but not sure where and why :(

Your help is much appreciated!
 

skyevision

New Member
Joined
Jan 21, 2008
Messages
8
is the other machine logged in currently? does your user name match a username/password combo that exists on this other machine? is the rpc service running on the other machine? is the rpc locator service running?
can you use
\\desktop2\c$ to browse the other machines hard drive? (you can if you have admin rights on that machine.)

1) Both machines logged in (as Administrator)
2) Machine 1's user is Desktop (logged in as Administrator), Machine 2's user is Desktop2 (logged in as Administrator). Same workgroup, different usernames, different passwords.
3) RPC Service running, started RPC Locator service too. Not sure if it matters, but can RDC without a problem. Also made sure that "Allow system to be shutdown without having to log on" is Enabled in the Local Group Policy.
4) Can browse to \\desktop2\c$ once I've enterred Desktop2's username and password.

The thing is, if it won't let me shutdown because of authentication - why did it shutdown the first 3 times? Would like to start using the Shutdown GUI when needing to reboot pc's, but need to make sure I use it right before using it.

Any info would be great.
 
Last edited:

The_Unbeliever

Honorary Master
Joined
Apr 19, 2005
Messages
103,196
use :

net use \\<target PC>\IPC$ /user:administrator password
shutdown -m \\<target PC>


the first command authenticates you against that PC. The second command shuts it down.

Syntax of the shutdown command :

Code:
C:\>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]

        No args                 Display this message (same as -?)
        -i                      Display GUI interface, must be the first option
        -l                      Log off (cannot be used with -m option)
        -s                      Shutdown the computer
        -r                      Shutdown and restart the computer
        -a                      Abort a system shutdown
        -m \\computername       Remote computer to shutdown/restart/abort
        -t xx                   Set timeout for shutdown to xx seconds
        -c "comment"            Shutdown comment (maximum of 127 characters)
        -f                      Forces running applications to close without war
ning
        -d [u][p]:xx:yy         The reason code for the shutdown
                                u is the user code
                                p is a planned shutdown code
                                xx is the major reason code (positive integer less than 256)
                                yy is the minor reason code (positive integer less than 65536)

C:\>

You probably will need to use the -f flag as well ;)
 

skyevision

New Member
Joined
Jan 21, 2008
Messages
8
use :

net use \\<target PC>\IPC$ /user:administrator password
shutdown -m \\<target PC>


the first command authenticates you against that PC. The second command shuts it down.

Syntax of the shutdown command :

Code:
C:\>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]

        No args                 Display this message (same as -?)
        -i                      Display GUI interface, must be the first option
        -l                      Log off (cannot be used with -m option)
        -s                      Shutdown the computer
        -r                      Shutdown and restart the computer
        -a                      Abort a system shutdown
        -m \\computername       Remote computer to shutdown/restart/abort
        -t xx                   Set timeout for shutdown to xx seconds
        -c "comment"            Shutdown comment (maximum of 127 characters)
        -f                      Forces running applications to close without war
ning
        -d [u][p]:xx:yy         The reason code for the shutdown
                                u is the user code
                                p is a planned shutdown code
                                xx is the major reason code (positive integer less than 256)
                                yy is the minor reason code (positive integer less than 65536)

C:\>

You probably will need to use the -f flag as well ;)

Ahhh thanks, it works now... but.. what I don't understand is... why could I manage to remotely shutdown the machine the first few times I tried it, without authenticating?

Thanks for the help though.
 
Top