1

I'm using my father's computer (named SandroPC) and only his user (sandro) was the administrator. I created a user for myself (guilherme) and tried adding it to sudo group, but a weird thing has happened:

When I log in on my user, it doesn't appear to be on sudo group:

guilherme@SandroPC:~$ groups
guilherme

And, if i do a su - guilherme, it appears to fix the problem:

guilherme@SandroPC:~$ su - guilherme
Password:
guilherme@SandroPC:-$ groups
guilherme sudo

And, on /etc/group, the user is listed as sudo:

guilherme@SandroPC:~$ cat /etc/group | grep sudo
sudo:x:27:sandro,guilherme

This problem does not happen when I log into his user, it is instantly on sudo group.

Is this the expected behaviour? If not, how do I fix the problem? If it is, is there a work-around for this?

I'm sorry for my bad english, as it is not my main language. Thank you!

New contributor
user8357283 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Please Edit ( askubuntu.com/posts/1157903/edit ) your post and show us /bin/ls -l /etc/group. Did the first login happen before the file was edited? Group membership is assigned at login time, but see man newgrp. What does id show? – waltinator Jul 13 at 1:07

Your Answer

user8357283 is a new contributor. Be nice, and check out our Code of Conduct.

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.