0

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?

user293469
  • 1
  • 1
  • 1
  • 1
    Or 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 * as USER* and *sudo as group*. (according to usage of `adduser`) – Pandya Jun 14 '14 at 13:05

1 Answers1

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.

terdon
  • 98,183
  • 15
  • 197
  • 293
Pabi
  • 7,351
  • 3
  • 40
  • 49
  • 3
    Please 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