I added a user to the root group, but the user is still not able to perform operations that require root's permissions. What is the problem?
Asked
Active
Viewed 582 times
2 Answers
2
root
login is disabled on Ubuntu. Adding user to the root
group will only allow access to files that have root
group, for example some config files. Being in the root
group does NOT give any special privs.
To grant a user access to sudo
, read man sudoers
and add them to the sudo
group.
adduser <username> sudo
The, once the other user logs out&in, or does a newgrp sudo
, the other user will be able to preface his/her command with sudo
to run as root
, e.g. sudo wc -l /etc/shadow
.

waltinator
- 36,399
adduser
as given returns an error message. Perhaps you meantaddgroup
instead? Also, you largely duplicated what LeonidMew already answered; you really need to add more content to your answer to superseded his answer. – doneal24 Feb 12 '19 at 18:48<username>
with the Name of the User? Did you pass exactly two parameters toadduser
? – waltinator Feb 12 '19 at 18:55adduser <username> sudo
where