In an almalinux9.5 machine, I am sudo user. I am using a vnc session to access the machine. I've added myself from this vnc machine to linux groups using :
sudo usermod -aG <group-name> <user-name>
However when checking my groups, I am not able to see the new groups added except in two cases:
Logging again from my existing terminal : su -l $USER . Opening a new ssh session. Note that: In the vnc session, when opening another terminal, and checking the groups, I can't see the new groups added, expect "as mentioned above" by re-logging. So as workaround I need to re-login everytime I open a new terminal or work from ssh which is not practical in my case.
Do I miss something?