Stop fighting with stale supplementary groups for active sessions
User & Group Management
Stop fighting with stale supplementary groups for active sessions
🧩 The Challenge
Ever add a user to a new group, tell them to hop back in, and watch them still get permission denied because their session is hanging onto old credentials? I’ve wasted way too much time convincing people that “re-logging” actually means closing every single open terminal window.
💡 The Fix
Instead of forcing a logout or reboot, you can refresh the group list for a running shell process instantly. It saves you from having to kill their tmux sessions or disconnect them mid-work.
exec newgrp groupname
⚙️ Why It Works
Running this replaces your current shell process with a new one that re-reads the system group database, picking up those fresh memberships without dropping your connection.
🚀 Pro-Tip: Use this inside a script if you need to elevate permissions for a specific sub-process without spawning a whole new login shell.
Linux Tips & Tricks | © ngelinux.com | 9/12/2026
