Size: 229
Comment:
|
Size: 425
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]