I am looking for something like sudo (or something that can be run from sudo) that allows me to run a program with my uid and primary gid, but with an additional supplementary group.
Run program with additional supplementary group
linux;permissions
Warning #1: this is an alternative 'hacky' approach.Warning #2: not all applications/script might be able to handle this ambiguous uid/gid.Create a new user with the same uid and gid, by using useradd, its --non-unique option to allow that multiple users with the same uid/gid exist and its --groups option to specify additional groups. E.g.:useradd --uid 1001 --gid 1001 --groups 1002,1003 --shell /bin/bash \        --home /home/cloneduser cloneduserYou should then run the program as this new user. I suggest to debug it using id.