Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Terminal issue

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
3hre
Posts: 32
Joined: 2018-08-07 17:29

Terminal issue

#1 Post by 3hre »

"wicked is not in the sudoers file. This incident will be reported."

A websearch shows that this appears to be common but recommendations to correct it have been unsuccessful.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 706
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 60 times

Re: Terminal issue

#2 Post by cds60601 »

Have you tried:

Code: Select all

man sudo

Cheers
Chris
Supercalifragilisticexpialidocious

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#3 Post by GarryRicketson »

This has been asked a few 100 times on this forum, here is 1;
http://forums.debian.net/viewtopic.php? ... doers+file
A websearch shows that this appears to be common but recommendations to correct it have been unsuccessful.
please show us exactly what you have tried, then maybe someone can say
something about why it was not successful. Use "code boxes", and show us
what you tried. Not what some link to a tutorial you read some where, and what it says,but exactly what you actually tried.
Last edited by GarryRicketson on 2018-08-07 18:04, edited 1 time in total.

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Terminal issue

#4 Post by arochester »

Code: Select all

usermod -a -G sudo <username>
Replace <username> with your username to which you want to grant sudo access.

Now logout & login to get sudo access to those users.

3hre
Posts: 32
Joined: 2018-08-07 17:29

Re: Terminal issue

#5 Post by 3hre »

cds60601 wrote:Have you tried:

Code: Select all

man sudo

Cheers
Chris
No, I have not. I am confused/concerned as to why the username I identified when I installed is not being recognized?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#6 Post by GarryRicketson »

Additional "hint"

Code: Select all

garry$ usermod -a -G sudo garry    
usermod: Program must be run as root
$
 

3hre
Posts: 32
Joined: 2018-08-07 17:29

Re: Terminal issue

#7 Post by 3hre »

3hre wrote:
cds60601 wrote:Have you tried:

Code: Select all

man sudo

Cheers
Chris
No, I have not. I am confused/concerned as to why the username I identified when I installed is not being recognized?
And ... for the sake that is all that is good in this world ... it does not seem to be responding to these commands ~ unless I am doing it wrong

icked@Wicked:~$ sudoedit
usage: sudoedit [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt]
[-u user] file ...
wicked@Wicked:~$ sudoedit -u user Wicked
sudoedit: unknown user: user
sudoedit: unable to initialize policy plugin

wicked@Wicked:~$ sudoedit -u Wicked

usage: sudoedit [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt]
[-u user] file ...
wicked@Wicked:~$ sudoedit -u
[sudo] password for wicked:

wicked is not in the sudoers file. This incident will be reported.
wicked@Wicked:~$ sudoedit -u

sudoedit: option requires an argument -- 'u'
usage: sudoedit [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt]
[-u user] file ...

wicked@Wicked:~$ sudoedit [-u user]
[sudo] password for wicked:
wicked is not in the sudoers file. This incident will be reported.
wicked@Wicked:~$

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#8 Post by GarryRicketson »

Can you use "su" to log in as root ?
To run the command shown by arochester, you must be root , you did set a root
password when you installed Debian , didn't you ?,... or if you didn't we need to know that, also what version of Debian you installed.
I am confused/concerned as to why the username I identified when I installed is not being recognized?
There have been some problems in some Debian versions, with this, so it is important to know what version you have installed.
Does 'man sudo' give you a manual , it should ?
======= edit ====
Also, see

Code: Select all

man sudoedit
What file do you need to edit as sudo ?


A example of using "sudoedit" :

Code: Select all

$  sudoedit /etc/apt/sources.list 
Would open /etc/apt/sources.list, and you would be able to edit it. It (sudo) would prompt you for your password first. Normally the /etc/apt/sources.list file requires root privileges to edit, so that is what "sudoedit" is used for, to edit files that require root privileges.
Or, for another example, a file in your home directory, that has write permissions for the user:

Code: Select all

$ pwd
/home/garry
garry$ sudoedit top.txt
Password: 
sudoedit: top.txt: editing files in a writable directory is not permitted
garry$ 
 
'sudoedit' will not work, it is not needed.

Since it says 'wicked" is not in the sudoers file, you can double check with this command :

Code: Select all

grep sudo /etc/group
Is "wicked" listed ?
http://forums.debian.net/viewtopic.php? ... 2&#p677812
========== edited ===========
The command shown by arrochester :
Postby arochester » 2018-08-07 12:01

Code: Select all

    usermod -a -G sudo <username> [/coe] [/quote]
 Should work, if you can use 'su' to become root,... Below, is a screen shot, 
as you can see, I was not in the sudo group, so I ran the command, and it added me. 
[img]http://www.parrotsandopenbsd.org/images/a-sudo-8-7.png[/img]

3hre
Posts: 32
Joined: 2018-08-07 17:29

Re: Terminal issue

#9 Post by 3hre »

I did set a root password on install; I installed Debian 9.5; man sudo does give me a manual (some of the stupid errors in there were just me being a stressed idiot and hit enter too soon)

wicked@Wicked:~$ sudo mv firefox /opt
[sudo] password for wicked:
wicked is not in the sudoers file. This incident will be reported.
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:
wicked@Wicked:~$ usermod -a -G sudo Wicked
bash: usermod: command not found
wicked@Wicked:~$ usermod -a -G sudo wicked
bash: usermod: command not found
wicked@Wicked:~$ usermod -a -G sudo <username>
bash: syntax error near unexpected token `newline'
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:
wicked@Wicked:~$

Code: Select all

bash: [code]: command not found
wicked@Wicked:~$ usermod -a -G sudo <username> [/coe] 
bash: username: No such file or directory
wicked@Wicked:~$ [code]
bash: [code]: command not found
wicked@Wicked:~$ usermod -a -G sudo Wicked [/coe]
bash: usermod: command not found
wicked@Wicked:~$

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#10 Post by GarryRicketson »

I did set a root password on install
ok, that's good,.. What I see that you are doing wrong,..
You must become root to run the "usermod" command,
so, type su, it will ask for the password , use the one you set when you installed.
you should see a change, the $ will change to # , that indicates you are root.

Code: Select all

garry$  su
Password:
garry# 
 
You can verify, if you are root by using the 'whoami' command:

Code: Select all

garry# whoami
root
garry# 
then type in the command;

Code: Select all

usermod -a -G sudo Wicked

(If you want Wicked, if you want wicked, all lower case, use that)
After running the 'usermod' command be sure to exit:

Code: Select all

garry# exit
garry$ 
Then run the 'grep' command;

Code: Select all

garry$ grep sudo /etc/group 
==============================

It looks like you are copy/pasting, badly. these commands should not include the word code, inside brackets,..:



the reason this does not work ;

Code: Select all

wicked@Wicked:~$ usermod -a -G sudo Wicked
bash: usermod: command not found
wicked@Wicked:~$ usermod -a -G sudo wicked
bash: usermod: command not found 
Is because you did not login as root using 'su'. you must be root to run that command.
Last edited by GarryRicketson on 2018-08-07 21:56, edited 1 time in total.

3hre
Posts: 32
Joined: 2018-08-07 17:29

Re: Terminal issue

#11 Post by 3hre »

wicked@Wicked:~$ su
Password:
root@Wicked:/home/wicked# usermod -a -G sudo Wicked
usermod: user 'Wicked' does not exist
root@Wicked:/home/wicked#

And this is where my brain feels like it is breaking a little ... because I know what I typed in when I installed and I feel so annoyed that I am thinking maybe I should just reinstall all over again lol
GarryRicketson wrote:
I did set a root password on install
ok, that's good,.. What I see that you are doing wrong,..
You must become root to run the "usermod" command,
so, type su, it will ask for the password , use the one you set when you installed.
you should see a change, the $ will change to # , that indicates you are root.

Code: Select all

garry$  su
Password:
garry# 
 
You can verify, if you are root by using the 'whoami' command:

Code: Select all

garry# whoami
root
garry# 
then type in the command;

Code: Select all

usermod -a -G sudo Wicked

(If you want Wicked, if you want wicked, all lower case, use that)
After running the 'usermod' command be sure to exit:

Code: Select all

garry# exit
garry$ 
Then run the 'grep' command;

Code: Select all

garry$ grep sudo /etc/group 
==============================

It looks like you are copy/pasting, this

Code: Select all

[code] 
should not be part of the commands;
wicked@Wicked:~$

Code: Select all

bash: [code]: command not found
wicked@Wicked:~$ usermod -a -G sudo <username> [/coe] 
bash: username: No such file or directory
wicked@Wicked:~$ [code] [/quote]
 the reason this does not work ; 
[code]wicked@Wicked:~$ usermod -a -G sudo Wicked
bash: usermod: command not found
wicked@Wicked:~$ usermod -a -G sudo wicked
bash: usermod: command not found 
Is because you did not login as root using 'su'. you must be root to run that command.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#12 Post by GarryRicketson »

Use the 'whoami' command like I showed:

Code: Select all

$ whoami
$ garry 
You will see the user is NOT Wicked, it is wicked,.... I see that because it shows:

Code: Select all

wicked@Wicked:~$ su 
user@Hostmame, your hostname is Wicked, but your username is wicked.
It shows here as well:

Code: Select all

root@Wicked:/home/wicked#  
The username, is used for the directory you are in, and it says, "wicked",
NOT : Wicked
=====
Try :

Code: Select all

usermod -a -G sudo wicked 
and see what happens, you must remember/know, Linux is all ways case sensitive, if the user name is
"wicked", "Wicked" will not work, that is a different username.
Maybe you thought you used W but didn't , I don't know on that.
My thoughts are though, and I don't mean to sound rude, but I think you need to read some lessons, documentation, and learn more about linux, before you start trying to do anything using "sudo" or "su",...

You can create a user named Wicked , using the 'adduser ' command
See:

Code: Select all

man adduser
=== edited, adduser is easier, ....
maybe I should just reinstall all over again lol
Not at all necessary, but that is entirely up to you.
Last edited by GarryRicketson on 2018-08-07 23:43, edited 3 times in total.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 706
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 60 times

Re: Terminal issue

#13 Post by cds60601 »

[quote="3hre"]I did set a root password on install; I installed Debian 9.5; man sudo does give me a manual (some of the stupid errors in there were just me being a stressed idiot and hit enter too soon)

wicked@Wicked:~$ sudo mv firefox /opt
[sudo] password for wicked:
wicked is not in the sudoers file. This incident will be reported.
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:
wicked@Wicked:~$ usermod -a -G sudo Wicked
bash: usermod: command not found
wicked@Wicked:~$ usermod -a -G sudo wicked
bash: usermod: command not found
wicked@Wicked:~$ usermod -a -G sudo <username>
bash: syntax error near unexpected token `newline'
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:
wicked@Wicked:~$

Code: Select all

bash: [code]: command not found
wicked@Wicked:~$ usermod -a -G sudo <username> [/coe] 
bash: username: No such file or directory
wicked@Wicked:~$ [code]
bash: [code]: command not found
wicked@Wicked:~$ usermod -a -G sudo Wicked [/coe]
bash: usermod: command not found
wicked@Wicked:~$[/quote]



Just a thought - instead of using Wicked , try using wicked.
I see that you keep using the "W" but your prompt shows "w"
As to the command. usermod failing- you need to be root first (since you mentioned you gave root a password on install, us it).


Cheers
Chris
Supercalifragilisticexpialidocious

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#14 Post by GarryRicketson »

myself>>You will see the user is NOT Wicked, it is wicked,.... I see that because it shows:
That is what I said as well, I think maybe the OP does not realize linux is case sensitive.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 706
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 60 times

Re: Terminal issue

#15 Post by cds60601 »

LOL Garry, I failed to see that. Oh my, the old eyes are playin' tricks on me.


Cheers
Chris
Supercalifragilisticexpialidocious

3hre
Posts: 32
Joined: 2018-08-07 17:29

Re: Terminal issue

#16 Post by 3hre »

GarryRicketson wrote:
myself>>You will see the user is NOT Wicked, it is wicked,.... I see that because it shows:
That is what I said as well, I think maybe the OP does not realize linux is case sensitive.
lol I do realize that; I am a bit of a Linux newb but not a computer one. I did intend for it to be with a capital W and if I understand correctly there was a command in there to allow the changing of that? In any case, this is the result of the last set of commands:

wicked@Wicked:~$ su
Password:
root@Wicked:/home/wicked# usermod -a -G sudo Wicked
usermod: user 'Wicked' does not exist
root@Wicked:/home/wicked#

And this is where my brain feels like it is breaking a little ... because I know what I typed in when I installed and I feel so annoyed that I am thinking maybe I should just reinstall all over again lol

And then this happens: wicked@Wicked:~$ sudo wget -O FirefoxSetup.tar.bz2
[sudo] password for wicked:
wicked is not in the sudoers file. This incident will be reported.
wicked@Wicked:~$

Wth you know? We went through all of this ... everything was just fine and now this ~ clearly typing in lowercase as is needed. Is it that I just need to log in as root constantly whenever I want to install anything? I was previously using Mint and it never required a root log in for simple installs

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 706
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 60 times

Re: Terminal issue

#17 Post by cds60601 »

3hre wrote:
GarryRicketson wrote:
myself>>You will see the user is NOT Wicked, it is wicked,.... I see that because it shows:
That is what I said as well, I think maybe the OP does not realize linux is case sensitive.
lol I do realize that; I am a bit of a Linux newb but not a computer one. I did intend for it to be with a capital W and if I understand correctly there was a command in there to allow the changing of that? In any case, this is the result of the last set of commands:

wicked@Wicked:~$ su
Password:
root@Wicked:/home/wicked# usermod -a -G sudo Wicked
usermod: user 'Wicked' does not exist
root@Wicked:/home/wicked#

And this is where my brain feels like it is breaking a little ... because I know what I typed in when I installed and I feel so annoyed that I am thinking maybe I should just reinstall all over again lol

And then this happens: wicked@Wicked:~$ sudo wget -O FirefoxSetup.tar.bz2
[sudo] password for wicked:
wicked is not in the sudoers file. This incident will be reported.
wicked@Wicked:~$

Wth you know? We went through all of this ... everything was just fine and now this ~ clearly typing in lowercase as is needed. Is it that I just need to log in as root constantly whenever I want to install anything? I was previously using Mint and it never required a root log in for simple installs
You appear to still be failing to see the point. You NEED to use the lower case w. THAT, is what your login ID is. Where the capital W, is the user name.
Use your login ID (wicked) in the line for the addition to sudoers, NOT your user name (Wicked)

The same will hold true for the usermod command executed as root, use the login ID and not the username.
Supercalifragilisticexpialidocious

3hre
Posts: 32
Joined: 2018-08-07 17:29

Re: Terminal issue

#18 Post by 3hre »

You appear to still be failing to see the point. You NEED to use the lower case w. THAT, is what your login ID is. Where the capital W, is the user name.
Use your login ID (wicked) in the line for the addition to sudoers, NOT your user name (Wicked)

The same will hold true for the usermod command executed as root, use the login ID and not the username.[/quote]

I did actually, "root@Wicked:/home/wicked# " I did not type Wicked, that was a system response to what I did type,

"wicked@Wicked:~$ su
Password:
root@Wicked:/home/wicked# usermod -a -G sudo wicked
root@Wicked:/home/wicked#

The part which presently is the problem is this:

wicked@Wicked:~$ sudo wget -O FirefoxSetup.tar.bz2
[sudo] password for wicked:
wicked is not in the sudoers file. This incident will be reported.
wicked@Wicked:~$

If I can log in as root with wicked then why is it that it would be saying "wicked is not in the sudoers file. This incident will be reported" still? It doesn't get better after that either ... it can't find the Firefox setup file indicated about, can't get it to change to desktop, can't get it to unpack ... this whole thing is just a mess and am starting to wonder if I should just reinstall the OS all over again but really do not want to believe that it is going to require something that extreme

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#19 Post by GarryRicketson »

Code: Select all

"wicked@Wicked:~$ su
Password:
root@Wicked:/home/wicked# usermod -a -G sudo wicked
root@Wicked:/home/wicked#  
Did you exit correctly, ?
Then as a normal user , run the

Code: Select all

grep sudo /etc/group 
And show us what it says now.
==== edit ===
Please stop quoting all the previous posts/text, it is just making a mess, and really hard to follow , what exactly you have actually done. If need be, and
absolutely necessary, just quote the specific part, not the entire post.
===== with that said =======
by 3hre » 2018-08-07 14:46

I did set a root password on install; I installed Debian 9.5; man sudo does give me a manual (some of the stupid errors in there were just me -----
Did you install "sudo" , after you installed Debian ? when one sets a root password, I don't think "sudo" is installed by default, to install sudo:

Code: Select all

$ su
$password: (type in your root pasword)
# apt install sudo 

After it is installed, you should be able to add user "sudoers", etc,... you will need to go through the processes again, I suspect you do not have sudo installed.

3hre
Posts: 32
Joined: 2018-08-07 17:29

Re: Terminal issue

#20 Post by 3hre »

Sorry about that, I will adjust that in the forums preferences so it does not automatically include that. Here is the results from what you posted:

wicked@Wicked:~$ su
Password:
root@Wicked:/home/wicked# apt install sudo
Reading package lists... Done
Building dependency tree
Reading state information... Done
sudo is already the newest version (1.8.19p1-2.1).
sudo set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@Wicked:/home/wicked# exit
exit
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:wicked
wicked@Wicked:~$ grep sudo /etc/group
sudo:x:27:wicked
wicked@Wicked:~$

Post Reply