This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Shutdown as Loginuser

Hallo Zusammen,

ich bin dabei ein Powershell-Shutdown Script zu erstellen. Da alles automatisch laufen soll, müsste der Shutdown-Befehl für die Sophos mit dem Loginuser geschehen, da die Passwort-Abfrage für den "su" nicht automatisch geschehen kann bzw. das Passwort soll nicht im klartext irgendwo stehen.

 

Wie stelle ich das an, dass ich einen Shutdown-Befehl mit dem Loginuser absetzen kann?

 

Beste Grüße

Dominik

 

Hello everyone,

i am writing a Powershell Shutdown Script. As it have to run full automaticly, the Shutdown-Command has to send by the Loginuser. The Passwort query for the "su" can't be automatic, respectively the passwort must not be shown in any script as plain text.

How can i accomplish that the loginuser can send a Shutdown-Command?


Best regards

Dominik



This thread was automatically locked due to age.
Parents
  • Hallo Dominik,

    es gibt im etc/init.d ordner Scripts z.B. reboot, hier kannst du den reboot mit "reboot start" ausführen. Hier gibt es auch ein Script Powerd das müsste eigentlich für "power down" stehen, das kann ich allerdings gerade nicht austesten. Was aber fakt ist, selbst für den reboot Befehl musst du SuperUser Berechtigungen haben. Der Loginuser ist nicht in der Lage diese Befehle auszuführen.

    Regards

    Jason

    Sophos Certified Architect - UTM

  • Okay, wie könnte ich dem Loginuser diese Berechtigungen geben?

    Oder wie könnte ich nachdem die SSH Session aufebaut wurde, das Passwort verschlüsselt weitergeben ohne es irgendwo im Klartext zu speichern? Wie gesagt es muss automatisch geschehen.

     

    Danke auf jeden Fall für die Hilfe!

     

    Beste Grüße

     

    Dominik

  • You void in fact all support, if you change the loginuser permissions on certain files.

    Like mentioned before, to setup a SSH key authentication as root, you only need a Public/Privat Key authentication.

    https://community.sophos.com/kb/en-us/127200

    __________________________________________________________________________________________________________________

Reply Children