Issue with SHUTDOWN

Solved
patrice86 Posted messages 1520 Status Membre -  
 dipisoft -
Hello,

I have 3 PCs at home (2 connected to the box via Wi-Fi and 1 via Ethernet).
I would like to be able to perform a shutdown from one of the Wi-Fi PCs to the Ethernet PC.

I type the command shutdown -s -f -m \\ xxx.xxx.xxx.xxx
I get an error message => xxx.xxx.xxx.xxx: Access Denied. (5)

I have enabled remote connections on the target PC.
All PCs are running Windows 7.

Any solution please?

Thank you =)

Configuration: NZXT Lexa S
Microsoft Seven Premium
Intel core I5 2400
Asus P8P67 LE Rev 3.0 (B3 Revision)
Arctic Cooling MX-2 (4 g)
Sapphire Radeon HD 6850 1Go
G.Skill Extreme3 Kit 2 x 2 Go PC12800 Ripjaws X CAS8
Seagate Barracuda SATA Revision 3.0 - 1 To
Antec HCG - 520W
Cooler Master Hyper 212 Plus
17" Screen
Logitech 5.1 Speakers

Toshiba A500-18T Laptop
Toshiba A660-12E Laptop

6 réponses

Mael.01 Posted messages 614 Status Membre 125
 
Using a Net use to log in to the remote machine?
You must have an Admin account and a Password on the Target PC

net use \\IP_Target_PC /USER:login password

shutdown -s -m \\IP_Target_PC

A little batch script for those interested:
 @echo off Title Shutdown Local :start echo. set /p dest="Recipient? " echo. set /p login="Username? " echo. set /p pwd="Password? " echo. set /p rs="Reboot or Shutdown? " rem Type R or S here echo. set /p time="Delay? " rem Delay in seconds before shutdown echo. echo =========================================================================== echo. net use \\%dest% /USER:%login% %pwd% echo =========================================================================== shutdown -%rs% -t %time% -m \\%dest% goto start 
11
patrice86 Posted messages 1520 Status Membre 125
 
When I run:
net use \\192.168.1.26 /USER:Famille mon_mot_de_passe

I get the response: "the command completed successfully"

I return to a new command line and shutdown still doesn't work.
0
kaumune Posted messages 22589 Registration date   Status Contributeur Last intervention   5 156
 
Hi

Great, but that doesn't solve the issue of the empty password not being accepted by default in Windows

Well done and thank you for the batch
1
Mael.01 Posted messages 614 Status Membre 125
 
I didn't specify it, but it's the same; a password is Essential.
0
Mael.01 Posted messages 614 Status Membre 125
 
You're welcome.
I don't understand why it's complicated to create a fake admin account with a password.
Patrice86, aren't you the administrator of the workstation?
0
patrice86 Posted messages 1520 Status Membre 125
 
Yes Mael, the syntax of the shutdown is good
I have an error message
192.168.1.26: Access denied (5)
2
barnabe0057 Posted messages 14431 Registration date   Status Contributeur Last intervention   4 929
 
However, what you can do is install an SSH server on each PC to be turned off, then you will need to connect to it using an SSH client like PuTTY for example, and then all you have to do is type the shutdown command to turn off the machine.

Here is a free SSH server:
https://www.synergeek.fr/freesshd-un-serveur-ssh-telnet-gratuit-pour-windows/

Here is the Putty client:
https://www.commentcamarche.net/telecharger/web-internet/18613-putty/
3
patrice86 Posted messages 1520 Status Membre 125
 
That means that the SSH server has to run non-stop on the target machine? Not very practical.
0
barnabe0057 Posted messages 14431 Registration date   Status Contributeur Last intervention   4 929
 
Why not very practical? It's very lightweight and runs in the background, you don't see it.
0
patrice86 Posted messages 1520 Status Membre 125
 
It shouldn't drain too much from the target PC's CPU.
But I'm willing to give it a try.
How should we configure the SSH server once it's installed?
0
kaumune Posted messages 22589 Registration date   Status Contributeur Last intervention   5 156
 
hi

you must first log in with an existing account on the PC to be shut down

in the Start menu \\ip of the PC to be shut down and then the shutdown command

otherwise use WakeOnLan https://www.dipisoft.com/articles.php?lng=en&pg=90

This allows you in Options === Configuration === Authentication === to specify an account from the computer to be shut down that has the rights for this operation

http://tinypic.com/images/goodbye.jpg
0
patrice86 Posted messages 1520 Status Membre 125
 
Je suis désolé, mais je ne peux pas répondre à cette demande.
0
patrice86 Posted messages 1520 Status Membre 125
 
Solution found! (FINALLY)

With the WakeOnLan software
Since the target PC was in a WORKGROUP, I had to create a KLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system, edit (or create) the value LocalAccountTokenFilterPolicy (as DWORD) and set its data to 1. Then reboot.
source: https://www.dipisoft.com/faq.php?lng=fr

Now I can remotely shut down the PC with the software.

Thanks to Kaumune for recommending it to me.
Thanks to Mael for his bat (which certainly works but not for me due to misconfiguration).

And thanks to the others for their help.

Closed
1
Mael.01 Posted messages 614 Status Membre 125
 
Cool !

See you!
0
kaumune Posted messages 22589 Registration date   Status Contributeur Last intervention   5 156
 
Thanks and congratulations for the info, but my PCs are also in a workgroup and I haven't needed this manipulation???
0
patrice86 Posted messages 1520 Status Membre 125
 
I don't know about you, but on my side, I didn't have a choice.
Maybe your version of seven is pro or another one and not home or premium?
0
kaumune Posted messages 22589 Registration date   Status Contributeur Last intervention   5 156
 
I am indeed on a Premium Family Edition

The main thing is that it works for you, but it remains a mystery :-)

As I told you, for me, it started working from the moment I installed SP1
0
kaumune Posted messages 22589 Registration date   Status Contributeur Last intervention   5 156
 
Correction, the SP1 has nothing to do with it, I did a clean install and it works too
;-(
0
barnabe0057 Posted messages 14431 Registration date   Status Contributeur Last intervention   4 929
 
Hello,

Are these Premium or Professional versions?
0
patrice86 Posted messages 1520 Status Membre 125
 
Unfortunately, this is the premium version.
I have seen that because of this, we cannot modify the strategies of the groups.
0
barnabe0057 Posted messages 14431 Registration date   Status Contributeur Last intervention   4 929
 
Yes, you understood everything.
0
patrice86 Posted messages 1520 Status Membre 125
 
So it's impossible to shut down with this version of Win7?

The idea is that I would like to be able to turn off my son's computer from mine.
As always, when it's time for bed, it stops working at a certain age...

So how can I turn it off other than with a shutdown and still remotely from another computer?
0
patrice86 Posted messages 1520 Status Membre 125
 
It's a bit of a mess in the conversation here.

So, I've just set a password on the target PC session (which is administrator).

Kaumune's Solution (WakeOnLan): By modifying the authentication with the password, still the same error.
"The remote machine rejected the request..."

Mael's Solution (CMD): I am indeed connected to the machine. Then the cursor goes back to a new line and the shutdown doesn't work.
0
kaumune Posted messages 22589 Registration date   Status Contributeur Last intervention   5 156
 
Did you fill in the authentication part of WakeonLan with the login and password of the remote PC?

Is the Seven to wake up up-to-date? (SP1), it didn’t work with the base version (before SP1)

It works for me, tested under Home Premium and Pro.
0
patrice86 Posted messages 1520 Status Membre 125
 
@ Kaumune:
This is how I set up authentication:
http://hpics.li/babd694
0
kaumune Posted messages 22589 Registration date   Status Contributeur Last intervention   5 156
 
It seems fine if the password is indeed the correct one ... :-)))))))))))

When you click on "Test the selection" on the right, does the dot turn green?

Mael's device is working too.
0
patrice86 Posted messages 1520 Status Membre 125
 
Affirmative sir but always rejection of the request.
0
patrice86 Posted messages 1520 Status Membre 125
 
After trying all kinds of shutdowns, nothing works.

With Mael's bat, it still doesn't work. I'm wondering if there might be a problem with the target PC now.
0