Skip to content

How to use dzdo instead of sudo for privilege escalation? #20654

Answered by martinpitt
jmblanton asked this question in Q&A
Discussion options

You must be logged in to vote

This has actually come up before, and we don't actually hardcode "sudo" in the code -- it's declared in the shell manifest.

#17536 implemented support for alternative authentication methods. You can create a manifest override to declare another "privileged bridge". It's unfortunately not documented well, but you can create a file /etc/cockpit/shell.override.json with something like

{
  "bridges": [
    {
      "privileged": true,
      "label": "dzdo",
      "spawn": [
        "dzdo", "--some-option", "cockpit-bridge", "--privileged"
      ]
    }
  ]
}

Look at the existing sudo/polkit declarations for inspiration.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jmblanton
Comment options

@martinpitt
Comment options

@martinpitt
Comment options

@jmblanton
Comment options

@martinpitt
Comment options

Answer selected by martinpitt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants