Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active March 19, 2017 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/5711322b5a12311571d8e828f40f0603 to your computer and use it in GitHub Desktop.
Save cleverca22/5711322b5a12311571d8e828f40f0603 to your computer and use it in GitHub Desktop.
wireshark no root
{ ... }:
{
security.setuidOwners = [
{
program = "dumpcap";
owner = "root";
group = "wireshark";
setuid = true;
setgid = false;
permissions = "u+rx,g+x";
}
];
}
{ pkgs, ... }:
{
security.wrappers.dumpcap = {
source = "${pkgs.wireshark}/bin/dumpcap";
permissions = "u+xs,g+x";
owner = "root";
group = "wireshark";
};
}
{ ... }:
{
users.extraUsers.clever.extraGroups = [ "wireshark" ];
users.extraGroups.wireshark.gid = 500;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment