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?
1 Answer
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 thesudo
group instead of touchingsudoers
. That's the entire point of the group's existence.– terdonJun 14, 2014 at 11:41
adduser USER GROUP
so add single user bysudo adduser <username> sudo
to input <username> as USER and sudo as group. (according to usage ofadduser
)