I used groupadd to add a group so that I could manage with git some root owned scripts. I then used usermod to add a user to a group. The user is the currently logged in standard user and I am in a shell through su into the superuser account in the terminal. I logged out and logged back in again, having run

sudo usermod -aGgroupname username

as I always have done. After I logged back in as the standard user, the command groups continued to show just the user, but when I logged in to the superuser account and ran

groups stdusername

the output showed that the std user is a member of the new group. I don't understand how this can happen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.