trying to add user to sudoers group gives me error
up vote
0
down vote
favorite
im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo
, shows error <username>
is not on the sudoers file. this incident will be reported.
Any suggestion what could it be? why that error if im trying to add.
adduser
New contributor
add a comment |
up vote
0
down vote
favorite
im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo
, shows error <username>
is not on the sudoers file. this incident will be reported.
Any suggestion what could it be? why that error if im trying to add.
adduser
New contributor
@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10
3
@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such<
…>
parts.
– PerlDuck
Nov 23 at 17:12
1
That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo
, shows error <username>
is not on the sudoers file. this incident will be reported.
Any suggestion what could it be? why that error if im trying to add.
adduser
New contributor
im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo
, shows error <username>
is not on the sudoers file. this incident will be reported.
Any suggestion what could it be? why that error if im trying to add.
adduser
adduser
New contributor
New contributor
edited Nov 23 at 17:06
PerlDuck
4,83111130
4,83111130
New contributor
asked Nov 23 at 16:52
Emanuel Rojas Agüero
1
1
New contributor
New contributor
@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10
3
@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such<
…>
parts.
– PerlDuck
Nov 23 at 17:12
1
That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14
add a comment |
@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10
3
@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such<
…>
parts.
– PerlDuck
Nov 23 at 17:12
1
That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14
@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10
@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10
3
3
@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such
<
…>
parts.– PerlDuck
Nov 23 at 17:12
@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such
<
…>
parts.– PerlDuck
Nov 23 at 17:12
1
1
That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14
That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
You are trying to use sudo
, however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo
for whatever reason. Example (notice that richard is not a member of sudo):
richard@s15:~$ groups
richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$ sudo ls -l
[sudo] password for richard:
richard is not in the sudoers file. This incident will be reported.
Now, that same thing for me (notice that I am a member of the sudo group):
doug@s15:~$ groups
doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
doug@s15:~$ sudo ls -l
total 4112
drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
...
Furthermore, since I have the rights to do so, I can add richard to the sudo group:
doug@s15:~$ sudo adduser richard sudo
Adding user `richard' to group `sudo' ...
Adding user richard to group sudo
Done.
And for a subsequent login for richard:
richard@s15:~$ groups
richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$
True. But this suggests that the OP tried to add himself to thesudo
group (without being member of it), doesn't it? We dont't know whether the two "instances" of<username>
in his post refer to the same or different unames.
– PerlDuck
Nov 23 at 17:24
1
Yes. The adduser part is a red herring, in my opinion. That error message only appears when a nonsudo
user tries to usesudo
, at least that I am aware of. That is why in my answer I used a trivial command.
– Doug Smythies
Nov 23 at 17:26
add a comment |
up vote
0
down vote
Try to add the user to the sudoers file manually:
- Go to home directory by running command
cd
- Then type
sudo su
It will ask you to type your password to be in root user.
- Run
visudo
Then add this line to the end of the file (change
username
with your username:
username ALL=(ALL) ALL
Save and exit
Credits:
Username is not in the sudoers file.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You are trying to use sudo
, however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo
for whatever reason. Example (notice that richard is not a member of sudo):
richard@s15:~$ groups
richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$ sudo ls -l
[sudo] password for richard:
richard is not in the sudoers file. This incident will be reported.
Now, that same thing for me (notice that I am a member of the sudo group):
doug@s15:~$ groups
doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
doug@s15:~$ sudo ls -l
total 4112
drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
...
Furthermore, since I have the rights to do so, I can add richard to the sudo group:
doug@s15:~$ sudo adduser richard sudo
Adding user `richard' to group `sudo' ...
Adding user richard to group sudo
Done.
And for a subsequent login for richard:
richard@s15:~$ groups
richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$
True. But this suggests that the OP tried to add himself to thesudo
group (without being member of it), doesn't it? We dont't know whether the two "instances" of<username>
in his post refer to the same or different unames.
– PerlDuck
Nov 23 at 17:24
1
Yes. The adduser part is a red herring, in my opinion. That error message only appears when a nonsudo
user tries to usesudo
, at least that I am aware of. That is why in my answer I used a trivial command.
– Doug Smythies
Nov 23 at 17:26
add a comment |
up vote
3
down vote
You are trying to use sudo
, however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo
for whatever reason. Example (notice that richard is not a member of sudo):
richard@s15:~$ groups
richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$ sudo ls -l
[sudo] password for richard:
richard is not in the sudoers file. This incident will be reported.
Now, that same thing for me (notice that I am a member of the sudo group):
doug@s15:~$ groups
doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
doug@s15:~$ sudo ls -l
total 4112
drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
...
Furthermore, since I have the rights to do so, I can add richard to the sudo group:
doug@s15:~$ sudo adduser richard sudo
Adding user `richard' to group `sudo' ...
Adding user richard to group sudo
Done.
And for a subsequent login for richard:
richard@s15:~$ groups
richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$
True. But this suggests that the OP tried to add himself to thesudo
group (without being member of it), doesn't it? We dont't know whether the two "instances" of<username>
in his post refer to the same or different unames.
– PerlDuck
Nov 23 at 17:24
1
Yes. The adduser part is a red herring, in my opinion. That error message only appears when a nonsudo
user tries to usesudo
, at least that I am aware of. That is why in my answer I used a trivial command.
– Doug Smythies
Nov 23 at 17:26
add a comment |
up vote
3
down vote
up vote
3
down vote
You are trying to use sudo
, however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo
for whatever reason. Example (notice that richard is not a member of sudo):
richard@s15:~$ groups
richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$ sudo ls -l
[sudo] password for richard:
richard is not in the sudoers file. This incident will be reported.
Now, that same thing for me (notice that I am a member of the sudo group):
doug@s15:~$ groups
doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
doug@s15:~$ sudo ls -l
total 4112
drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
...
Furthermore, since I have the rights to do so, I can add richard to the sudo group:
doug@s15:~$ sudo adduser richard sudo
Adding user `richard' to group `sudo' ...
Adding user richard to group sudo
Done.
And for a subsequent login for richard:
richard@s15:~$ groups
richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$
You are trying to use sudo
, however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo
for whatever reason. Example (notice that richard is not a member of sudo):
richard@s15:~$ groups
richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$ sudo ls -l
[sudo] password for richard:
richard is not in the sudoers file. This incident will be reported.
Now, that same thing for me (notice that I am a member of the sudo group):
doug@s15:~$ groups
doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
doug@s15:~$ sudo ls -l
total 4112
drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
...
Furthermore, since I have the rights to do so, I can add richard to the sudo group:
doug@s15:~$ sudo adduser richard sudo
Adding user `richard' to group `sudo' ...
Adding user richard to group sudo
Done.
And for a subsequent login for richard:
richard@s15:~$ groups
richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$
edited Nov 23 at 17:24
answered Nov 23 at 17:16
Doug Smythies
7,02631428
7,02631428
True. But this suggests that the OP tried to add himself to thesudo
group (without being member of it), doesn't it? We dont't know whether the two "instances" of<username>
in his post refer to the same or different unames.
– PerlDuck
Nov 23 at 17:24
1
Yes. The adduser part is a red herring, in my opinion. That error message only appears when a nonsudo
user tries to usesudo
, at least that I am aware of. That is why in my answer I used a trivial command.
– Doug Smythies
Nov 23 at 17:26
add a comment |
True. But this suggests that the OP tried to add himself to thesudo
group (without being member of it), doesn't it? We dont't know whether the two "instances" of<username>
in his post refer to the same or different unames.
– PerlDuck
Nov 23 at 17:24
1
Yes. The adduser part is a red herring, in my opinion. That error message only appears when a nonsudo
user tries to usesudo
, at least that I am aware of. That is why in my answer I used a trivial command.
– Doug Smythies
Nov 23 at 17:26
True. But this suggests that the OP tried to add himself to the
sudo
group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username>
in his post refer to the same or different unames.– PerlDuck
Nov 23 at 17:24
True. But this suggests that the OP tried to add himself to the
sudo
group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username>
in his post refer to the same or different unames.– PerlDuck
Nov 23 at 17:24
1
1
Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non
sudo
user tries to use sudo
, at least that I am aware of. That is why in my answer I used a trivial command.– Doug Smythies
Nov 23 at 17:26
Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non
sudo
user tries to use sudo
, at least that I am aware of. That is why in my answer I used a trivial command.– Doug Smythies
Nov 23 at 17:26
add a comment |
up vote
0
down vote
Try to add the user to the sudoers file manually:
- Go to home directory by running command
cd
- Then type
sudo su
It will ask you to type your password to be in root user.
- Run
visudo
Then add this line to the end of the file (change
username
with your username:
username ALL=(ALL) ALL
Save and exit
Credits:
Username is not in the sudoers file.
add a comment |
up vote
0
down vote
Try to add the user to the sudoers file manually:
- Go to home directory by running command
cd
- Then type
sudo su
It will ask you to type your password to be in root user.
- Run
visudo
Then add this line to the end of the file (change
username
with your username:
username ALL=(ALL) ALL
Save and exit
Credits:
Username is not in the sudoers file.
add a comment |
up vote
0
down vote
up vote
0
down vote
Try to add the user to the sudoers file manually:
- Go to home directory by running command
cd
- Then type
sudo su
It will ask you to type your password to be in root user.
- Run
visudo
Then add this line to the end of the file (change
username
with your username:
username ALL=(ALL) ALL
Save and exit
Credits:
Username is not in the sudoers file.
Try to add the user to the sudoers file manually:
- Go to home directory by running command
cd
- Then type
sudo su
It will ask you to type your password to be in root user.
- Run
visudo
Then add this line to the end of the file (change
username
with your username:
username ALL=(ALL) ALL
Save and exit
Credits:
Username is not in the sudoers file.
answered Nov 23 at 17:07
singrium
796117
796117
add a comment |
add a comment |
Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.
Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.
Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.
Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095439%2ftrying-to-add-user-to-sudoers-group-gives-me-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10
3
@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such
<
…>
parts.– PerlDuck
Nov 23 at 17:12
1
That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14