nicolasj92 Posted March 9, 2017 at 05:28 PM Share Posted March 9, 2017 at 05:28 PM Hallo, wie ist es möglich Bash Befehle als root auszuführen? Also beispielsweise os.system("sudo shutdown -h now")? Quote Link to comment Share on other sites More sharing options...
ric5sch Posted March 9, 2017 at 09:05 PM Share Posted March 9, 2017 at 09:05 PM Kennworteingabe erforderlich! in bash: sudo -s oder su - Quote Link to comment Share on other sites More sharing options...
nicolasj92 Posted March 10, 2017 at 12:48 PM Author Share Posted March 10, 2017 at 12:48 PM Also ist das als automatisch gestartetes Program gar nicht möglich? Ich will mich ja nicht jedes mal selber auf die Konsole schalten Quote Link to comment Share on other sites More sharing options...
nicolasj92 Posted March 11, 2017 at 02:37 PM Author Share Posted March 11, 2017 at 02:37 PM PUSH Quote Link to comment Share on other sites More sharing options...
photron Posted March 23, 2017 at 09:50 AM Share Posted March 23, 2017 at 09:50 AM Das geht z.B. so: os.system('echo tf | sudo -S -p "" shutdown -h now') Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.