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 413 times
2 Answers
3
Root login is disabled on Ubuntu. Adding user to root group will only affect permissions of files what have root group, for example edit some config files without sudo. Use sudo before a command to run that command as root, or sudo -i to get a root shell.
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
- 35,099
- 19
- 57
- 93
-
The command `adduser` as given returns an error message. Perhaps you meant `addgroup` 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
-
@DougO'Neal What exactly did you type? Did you replace `
` with the Name of the User? Did you pass exactly two parameters to `adduser`? – waltinator Feb 12 '19 at 18:55 -
`adduser
sudo` where – doneal24 Feb 12 '19 at 19:03is the name of an existing user.