On Tue, Jul 13, 2021 at 06:05:50AM +0300, Gunnar Gervin wrote: > I also have trouble with adding me in sudoers group, even though in Root a > message in the terminal said I was added, I cannot use the sudo command.
If you changed your group memberships (by editing /etc/group or by using adduser or similar), those changes don't happen until you login again. So, the short answer is "log out and back in". Each running process has a set of privileges associated with it, including a primary group ID and a list of supplementary groups. Those privileges can't be changed -- they stay the same until the process exits. >From a given shell (which is one of your running processes), you can see the privileges of that shell by running "id" with no arguments. You can see the privileges that you will have the next time you login by running "id yourusername". If you can't be bothered to log out and back in just yet, you can obtain a shell with a new set of privileges by running "exec su - yourusername". This will replace that shell (the one where you type the command) with a new login shell which has undergone the auth stuff that happens at login. This will not affect your other running processes, like your desktop environment or window manager, so eventually you'll want to log out.