I am running CentOS 7.3. If I log in over SSH I can run sudo commands and if I run groups I can see I'm in the groups <username> and wheel.If I connect to the desktop over VNC and launch a terminal, I can't run sudo commands (username is not in the sudoers file) and the only group I'm in is <username>.Why the difference, and how do I fix it to run sudo on the desktop?After questions in the comments; this is a standard build on a physical (Dell I think) server. There is no ldap process running but I have asked the question of the guy who installed it.From SSH terminal:uid=1001(username) gid=1001(username) groups=1001(username),10(wheel)From desktop terminal:uid=1001(username) gid=1001(username) groups=1001(username)If I run su - username in the desktop terminal I do then get the correct groups.Further update: Definitely no ldap in use.
Why is my user in different groups when logged in via SSH and on the desktop?
ssh;sudo;group;vnc