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?

2
  • 1
    Or maybe a better one would be How do I add a user to the “sudo” group? Jun 14, 2014 at 11:56
  • Usage is:adduser USER GROUP so add single user by sudo adduser <username> sudo to input <username> as USER and sudo as group. (according to usage of adduser)
    – Pandya
    Jun 14, 2014 at 13:05

1 Answer 1

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.

1
  • 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, 2014 at 11:41

Not the answer you're looking for? Browse other questions tagged .