FG
💻 Software

In Linux, how can I temporarily remove my association with a group?

Fresh7 days ago
Mar 15, 20262503 views
Confidence Score0%
0%

Problem

I need to test linux group permissions on a repository. In one shell, how can I temporarily remove one of my group associations? e.g. If my groups are defined as: How can I make it so it only returns without ?

Error Output

% groups
 foo bar baz

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: In Linux, how can I temporarily remove my association with a group?

Low Risk

It IS possible. Check out this code (valid C89, heh) I wrote in 25 mins. Usage example: WARNING THIS CODE IS SUID! While it drops privileges as you see on id's output, it MAY BE DANGEROUS. Dixi.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment