I tried using this command in the terminal:sudo adduser liam sylvester sudo but all it says is "Only one or two names allowed." My version is 12.04. Does anyone have a solution?
Asked
Active
Viewed 2,966 times
0
-
1Or maybe a better one would be [How do I add a user to the “sudo” group?](http://askubuntu.com/q/2214/22949) – Eliah Kagan Jun 14 '14 at 11:56
-
Usage is:`adduser USER GROUP` so add single user by `sudo adduser
sudo` to input * – Pandya Jun 14 '14 at 13:05as USER* and *sudo as group*. (according to usage of `adduser`)
1 Answers
0
You can edit the file /etc/sudoers using the visudo command which checks for syntax errors before saving the file (and so protects your system):
sudo visudo
Search for the line root ALL=(ALL) ALL and add a new line below: username ALL=(ALL) ALL.
-
3Please don't recommend that people (especially new users) edit `/etc/sudoers` directly. Also, a better approach would be to add the user to the `sudo` group instead of touching `sudoers`. That's the entire point of the group's existence. – terdon Jun 14 '14 at 11:41