Skip to main content

Discard the staged sudoers for a Linux computer

DELETE 

/computers/:computerId/sudoers

Deletes the staged sudoers so the computer falls back to the last scanned sudoers, and refreshes the admin inventory from it.

sudoersHash must equal the hash of the currently staged document.

Checks run in this order: non-Linux (400 Can only unstage sudoers content for Linux systems); Protect enabled, meaning Scan and Secure are both on (409 Cannot delete staged sudoers when Protect is enabled, nothing can be discarded while Protect is on, even with no hash); missing sudoersHash (400); hash mismatch (409 Provided hash of <x> does not match found hash of <y>); no staged document (404 JSON NotFoundError No Staged Sudoers Exists, whatever hash was sent).

Required role: superadmin or admin.

Request​

Responses​

Staged sudoers discarded. The body is an empty JSON object.