Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2024-09-30 14:36:03
Size: 30
Editor: 75
Comment:
Revision 4 as of 2024-09-30 17:01:35
Size: 425
Editor: 216
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Scripting Python setuid = = Scripting Python setuid =

This is primarily about writing a script that needs to be run as root by non-root users.

Step 1: Write your script and make sure that your script does exactly and only what you want it to be.

Step 2: {{{ # pyinstaller -F [scriptname] }}}

Step 3: {{{ # sudo chown root:root [scriptname] }}}

Step 4: {{{ # sudo chmod 770 [scriptname] }}}

step 4: {{{ # sudo u+s [scriptname] }}}

Scripting Python setuid

This is primarily about writing a script that needs to be run as root by non-root users.

Step 1: Write your script and make sure that your script does exactly and only what you want it to be.

Step 2:  # pyinstaller -F [scriptname] 

Step 3:  # sudo chown root:root [scriptname] 

Step 4:  # sudo chmod 770 [scriptname] 

step 4:  # sudo u+s [scriptname] 

ScriptingPythonSetuid (last edited 2024-09-30 17:01:55 by 216)