c0d33p
June 7, 2021, 10:41am
1
Hi all!
I would like to ask about your help with the ubridge package.
I’m unable to run command:
sudo setcap cap_net_admin,cap_net_raw=ep /run/current-system/sw/bin/ubridge
and it result in this output:
Failed to set capabilities on file `/run/current-system/sw/bin/ubridge’ (Invalid argument)
As this command pop up after starting the gns3. (GNS3 is a network emulator)
I’m not sure how to proceed with the investigation.
I had found in documentation that ubridge requires from user to be in the ubridge group
however, adding the user to this group in configuration.nix extraGroups do nothing.
(And even I’m not sure if it’s related…)
Is there a possibility that i need to create a sole config for this command / setting?
1 Like
skiran
August 12, 2022, 8:20pm
2
Hi,
I have used below security wrappers configuration, and then edited the file ~/.config/GNS3/2.2/gns3_server.conf
The ubridge path needs to be changed to ubridge_path = /run/wrappers/bin/ubridge
security.wrappers.ubridge = {
source = “/run/current-system/sw/bin/ubridge”;
capabilities = “cap_net_admin,cap_net_raw=ep”;
owner = “root”;
group = “ubridge”;
permissions = “u+rx,g+x”;
};
Now I am able to run GNS3
1 Like
Hmm when running this I get an error, as my system does not have the group ubridge
defined. Even after installing the ubridge package.
apr 26 14:23:57 hostname systemd[1]: Starting Create SUID/SGID Wrappers...
apr 26 14:23:58 hostname suid-sgid-wrappers-start[73662]: chown: invalid group: ‘root:ubridge’
apr 26 14:23:58 hostname systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE
apr 26 14:23:58 hostname systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.
apr 26 14:23:58 hostname systemd[1]: Failed to start Create SUID/SGID Wrappers.
warning: error(s) occurred while switching to the new configuration
You need to set users.groups.ubridge = {}
and users.users.<YOUR USER>.extraGroups = [ "ubridge" ]
Note, if extraGroups is already set, just add "ubridge"
to it
1 Like
In the end I needed to modify the permissions to be for my PATH to accept it to be usable.
permissions = "u+rx,g+rx,o+rx";