Terminal issue

New to Debian (Or Linux in general)? Ask your questions here!

Re: Terminal issue

Postby 3hre » 2018-08-07 23:02

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
3hre
 
Posts: 29
Joined: 2018-08-07 17:29

Re: Terminal issue

Postby cds60601 » 2018-08-07 23:10

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.
Yeah, 220, 221. Whatever it takes.
Server: Debian 9 (Stretch) Workstation: Archlinux
User avatar
cds60601
 
Posts: 136
Joined: 2017-11-25 05:58

Re: Terminal issue

Postby 3hre » 2018-08-07 23:40

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
3hre
 
Posts: 29
Joined: 2018-08-07 17:29

Re: Terminal issue

Postby GarryRicketson » 2018-08-07 23:54

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.
User avatar
GarryRicketson
 
Posts: 5124
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

Postby 3hre » 2018-08-08 00:59

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:~$
3hre
 
Posts: 29
Joined: 2018-08-07 17:29

Re: Terminal issue

Postby GarryRicketson » 2018-08-08 01:20

Ok, so it does appear you have sudo installed, and now " wicked " is
in the sudoers file as it should be.

Try a command that normally requires root, using sudo instead of su.
Try:
Code: Select all
sudo adduser guest
(where guest is could be any username)
Don't really add a user, use ctrl-c, and abort it, but show us what it
says.

But NOT this :
Code: Select all
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:~$ 

You need to read the manual on using 'wget', I don't think it would work that way anyway
Last edited by GarryRicketson on 2018-08-08 02:04, edited 1 time in total.
User avatar
GarryRicketson
 
Posts: 5124
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

Postby GarryRicketson » 2018-08-08 01:30

Well this is strange,... I get the same error, even though it says I am in the sudoers file.
Image
But anyway maybe, hopefully it is working for you,... show us what it says when you run the command,...
User avatar
GarryRicketson
 
Posts: 5124
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

Postby cds60601 » 2018-08-08 01:34

Garry - I'm by no means a sudo user but, shouldn't the Op be also moding the /etc/sudoers file to actually allow the use of sudo?
I may be just assuming that that file needs to be tweaked also.

UPDATED: Ah nix that question.
Per the file as long as the user belongs to the group....

Code: Select all
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL



Cheers
Chris
Yeah, 220, 221. Whatever it takes.
Server: Debian 9 (Stretch) Workstation: Archlinux
User avatar
cds60601
 
Posts: 136
Joined: 2017-11-25 05:58

Re: Terminal issue

Postby 3hre » 2018-08-08 01:50

wicked@Wicked:~$ sudo adduser
[sudo] password for wicked:
adduser: Only one or two names allowed.
wicked@Wicked:~$
3hre
 
Posts: 29
Joined: 2018-08-07 17:29

Re: Terminal issue

Postby 3hre » 2018-08-08 01:51

GarryRicketson wrote:Well this is strange,... I get the same error, even though it says I am in the sudoers file.
Image
But anyway maybe, hopefully it is working for you,... show us what it says when you run the command,...


I am kind of relieved by that. I know I am not a programmer level user but I didn't think I was that dense either lol
3hre
 
Posts: 29
Joined: 2018-08-07 17:29

Re: Terminal issue

Postby cds60601 » 2018-08-08 01:52

3hre wrote:wicked@Wicked:~$ sudo adduser
[sudo] password for wicked:
adduser: Only one or two names allowed.
wicked@Wicked:~$



Outstanding. I was hoping to do an update to my update. I replicated the same issue Garry had. For me, I rebooted the laptop and then it worked as you are now showing.
I assume that a simple logout and login might suffice, but I needed a reboot anyways.

Glad it's all sorted for you.

Cheers
Chris
Yeah, 220, 221. Whatever it takes.
Server: Debian 9 (Stretch) Workstation: Archlinux
User avatar
cds60601
 
Posts: 136
Joined: 2017-11-25 05:58

Re: Terminal issue

Postby 3hre » 2018-08-08 01:58

So then I should not be having any issues downloading/installing Firefox updates now? It's like that little thread you pull and it just keeps going and going.
3hre
 
Posts: 29
Joined: 2018-08-07 17:29

Re: Terminal issue

Postby cds60601 » 2018-08-08 02:07

3hre wrote:So then I should not be having any issues downloading/installing Firefox updates now? It's like that little thread you pull and it just keeps going and going.


Based on what you have shown (that sudo actually worked) you should have no issues installing via sudo.

Cheers
Chris
Yeah, 220, 221. Whatever it takes.
Server: Debian 9 (Stretch) Workstation: Archlinux
User avatar
cds60601
 
Posts: 136
Joined: 2017-11-25 05:58

Re: Terminal issue

Postby GarryRicketson » 2018-08-08 02:17

Sorry about this , I edited my previous post, but looks like you are in good shape,
Code: Select all
$ sudo adduser
requires a name, at least 1 , IE:
Code: Select all
sudo adduser Newuser

This would create a user with the name Newuser, if you wanted it could be
Wicked, or guest, what ever.
But it looks like sudo is working now.

3hre wrote:So then I should not be having any issues downloading/installing Firefox updates now? It's like that little thread you pull and it just keeps going and going.

I am not sure on that, is there some reason you don't just use the 'firefox-esr'
from the Debian repositories, ?
Any way, you should be able to use "sudo" now, as needed. Guess you just have to try it and see. I think your wget command needs a url though, that would be another topic though.
You could do a "test run", use sudo, and try to install some package from the Debian repositories, A fun one is "sl" ,
Code: Select all
 sudo apt install sl

After it installs, type sl (lower case L) at the prompt, and watch the train go by.
it is small and harmless.
User avatar
GarryRicketson
 
Posts: 5124
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

Postby GarryRicketson » 2018-08-08 02:26

cds60601 wrote:Garry - I'm by no means a sudo user but, shouldn't the Op be also moding the /etc/sudoers file to actually allow the use of sudo?
I may be just assuming that that file needs to be tweaked also.

UPDATED: Ah nix that question.
Per the file as long as the user belongs to the group....

Code: Select all
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL



Cheers
Chris

Me neither, in fact I hate it (sudo), and
shouldn't the Op be also moding the /etc/sudoers file
,... I did not reboot, logging out and then back did not seem to help, so that is what I did, kind of a "brute force" work around, and I don't know if it is a very good way, but I used "visudo" as root,
and added myself to the file, even though it showed
Code: Select all
%sudo   ALL=(ALL:ALL) ALL

Here is what I did:
Code: Select all
# User privilege specification
root   ALL=(ALL:ALL) ALL
garry   ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

So now I could use sudo if I want to, it works.
I expect someone will chime in with some reasons I should not have done it that way,..but it is on a VM anyway, so no big deal.
User avatar
GarryRicketson
 
Posts: 5124
Joined: 2015-01-20 22:16
Location: Durango, Mexico

PreviousNext

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable