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

Re: Terminal issue

#21 Post by GarryRicketson »

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: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#22 Post by GarryRicketson »

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
cds60601
df -h | participant
df -h | participant
Posts: 717
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Terminal issue

#23 Post by cds60601 »

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
Supercalifragilisticexpialidocious

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

Re: Terminal issue

#24 Post by 3hre »

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

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

Re: Terminal issue

#25 Post by 3hre »

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

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 717
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Terminal issue

#26 Post by cds60601 »

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
Supercalifragilisticexpialidocious

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

Re: Terminal issue

#27 Post by 3hre »

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.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 717
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Terminal issue

#28 Post by cds60601 »

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
Supercalifragilisticexpialidocious

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

Re: Terminal issue

#29 Post by GarryRicketson »

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: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

#30 Post by GarryRicketson »

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.

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

Re: Terminal issue

#31 Post by 3hre »

Output:

wicked@Wicked:~$ su
Password:
root@Wicked:/home/wicked# sudo apt install sl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.7 kB of archives.
After this operation, 99.3 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian stretch/main amd64 sl amd64 3.03-17+b2 [26.7 kB]
Fetched 26.7 kB in 0s (59.5 kB/s)
Selecting previously unselected package sl.
(Reading database ... 144176 files and directories currently installed.)
Preparing to unpack .../sl_3.03-17+b2_amd64.deb ...
Unpacking sl (3.03-17+b2) ...
Setting up sl (3.03-17+b2) ...
Processing triggers for man-db (2.7.6.1-2) ...
root@Wicked:/home/wicked#

About the Firefox ESR: I am using that to browse with as we 'speak' but Amazon Prime is a princess and says I need to upgrade to Quantum in order to watch videos from there /sigh

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 717
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Terminal issue

#32 Post by cds60601 »

Chromium?
Supercalifragilisticexpialidocious

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

Re: Terminal issue

#33 Post by GarryRicketson »

Ok , well any way, looks like sudo is working, so you should be able to download and install it. I can't help much on that if you have problems though , but some one else probably can, there have been several topics here on doing that.
Image

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

Re: Terminal issue

#34 Post by 3hre »

It's amazing how easily things get done when everything is working as intend. Quantum installed completely without issue :shock: Thank you for the help everyone <3

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

Re: Terminal issue

#35 Post by GarryRicketson »

your welcome

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 717
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Terminal issue

#36 Post by cds60601 »

Garry -

I also noted that if a user is a fan of using synaptic (such as myself) here is a tid-bit of info:

1. If a user is not in the sudoers file and they launch synaptic, the app requires the admin (root) password to run.
2. If a user IS in the sudoers file and the launch synaptic, the app will require the users password to run.

I didn't know that since I am not a user of sudo. Just something I noticed while testing last night.

Cheers
Chris
Supercalifragilisticexpialidocious

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

Re: Terminal issue

#37 Post by GarryRicketson »

I found that I did not really need this:

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 
I commented out the line:

Code: Select all

# garry   ALL=(ALL:ALL) ALL
and after rebooting still was able to use sudo just fine.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 717
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Terminal issue

#38 Post by cds60601 »

GarryRicketson wrote:I found that I did not really need this:

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 
I commented out the line:

Code: Select all

# garry   ALL=(ALL:ALL) ALL
and after rebooting still was able to use sudo just fine.
Yes. That does seem to make sense since being in the group allows all commands to be ran.
Like you, I don't bother with sudo but it's kinda nice to know any how.
Supercalifragilisticexpialidocious

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

Re: Terminal issue

#39 Post by GarryRicketson »

It was interesting, made me try using sudo, and learning a little more about it,
we do get a lot of questions on this. Also, if the OP does check in, please edit the subject line in your first post, add "solved" to it, and it might be better to change the subject, from "Terminal issue" to something like "sudo not working",

Any way, another thing that was kind of odd, unexpected, when I started my
Debian VM, to try some of the commands, I thought I would need to install sudo, since I had never installed it, but when I tried 'man sudo', the manual was there, and 'man sudoers', etc. When I tried the 'usermod' command, it appeared to work, and the 'grep' command showed I had been added to the sudoers group.
But then when I tried actually running a command as "sudo", that is when I got the "command not found" message, installing sudo solved that, but then I still had to repeat all the other steps, to add myself to the group.
That is what made me think the OP also, had not installed sudo, it turned out they had, but any way
To sum it all up, the first thing any one should do, is make sure sudo is installed,

Code: Select all

dpkg -s sudo 
Should work , if it is not installed, install it.
then follow the rest of the commands to put the user in the sudoers group

More details here:
https://wiki.debian.org/ListInstalledPackages
and
https://www.cyberciti.biz/faq/find-out- ... -in-linux/
==========
https://wiki.debian.org/sudo

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 717
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Terminal issue

#40 Post by cds60601 »

Nice! I wonder though, if a user opts to NOT issue a root password on install, I suspect that sudo is probably installed during the setup.

I actually read a thread somewhere here that someone didn't bother issuing a root password during the install and it appeared that sudo was installed as a default.
I have not tried that but I suspect that would be the case.

Kind of another neat little thing to know / discover.

Cheers
Chris
Supercalifragilisticexpialidocious

Post Reply