Differences between revisions 3 and 4
Revision 3 as of 2024-09-30 16:57:14
Size: 229
Editor: 216
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 6: Line 6:

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)