PrieserMax
Cadet
- Joined
- Jun 4, 2023
- Messages
- 2
Hello dear TrueNAS-community,
I am trying to shutdown TrueNAS via CMD from a Windows host.
I have an APC USV which is connected to my Host running Windows server with Hyper-V.
I have APC PowerChute Serial Shutdown installed, where I can put a script for shutting down other computers etc.
In my script I am shutting down another Windows machine and try to shutdown TrueNAS.
In there I have the following content:
content of NAS01shutdown.txt:
-> I guess the passing through of the password is the problem, but I don't know how to solve it
The user is member of the sshd and the check for allow sudo is checked.
Thanks in advance
Greetings
Max
I am trying to shutdown TrueNAS via CMD from a Windows host.
I have an APC USV which is connected to my Host running Windows server with Hyper-V.
I have APC PowerChute Serial Shutdown installed, where I can put a script for shutting down other computers etc.
In my script I am shutting down another Windows machine and try to shutdown TrueNAS.
In there I have the following content:
ipconfig /flushdns
net use \\PCXY\IPC$ /user:DOMAIN\USER PASSWORD
shutdown /s /m \\PCXY /t 30 /c "Dieser PC wird in 30 Sekunden wegen eines Stromausfalls heruntergefahren" /f
putty.exe -ssh sshshutdown@IPADDRESS -pw PASSWORT -m "C:\Program Files\APC\PowerChute Serial Shutdown\agent\cmdfiles\NASXYshutdown.txt"
content of NAS01shutdown.txt:
sudo shutdown -p now
[rA*(A8Aho_J#r$QJ#uJ
exit
-> I guess the passing through of the password is the problem, but I don't know how to solve it
The user is member of the sshd and the check for allow sudo is checked.
Thanks in advance
Greetings
Max