LOGBOOK

HELP

Quiz Entry - updated: 2026.10.13

How is a sudo rule stored in Active Directory, for example to let web developers restart the web server?

Extend the AD schema with the sudo project's sudoRole class, then create one sudoRole object per rule with the attributes sudoUser, sudoHost and sudoCommand.

  1. Extend the schema. AD does not know sudo rules by default. The sudo project ships a schema file, which is imported with ldifde. Changing the schema needs membership in Schema Admins, a highly privileged group that should otherwise stay empty.
  2. Create a container sudoers (an object of class sudoRole) in ADSI Edit. The normal "Users and Computers" tool cannot edit these attributes.
  3. Create one sudoRole per rule. Each object is one line of a sudoers file:
Attribute Example value Meaning
sudoUser %gg_ch_webdevs@g001.ckteck.com Who (the % marks a group)
sudoHost lc-001 On which host (name, IP, network or netgroup)
sudoCommand /bin/systemctl restart apache2 Exactly which command

The ticket asked for "sudo rights", but the rule follows the principle of least privilege: the web developers can restart Apache on one host and nothing else. A rule like sudoCommand: ALL would have made them full root.

Go deeper:

From Quiz: ISLAB / Access Management on Linux | Updated: Oct 13, 2026