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

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: 739
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 136 times
Been thanked: 65 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: 739
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 136 times
Been thanked: 65 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: 739
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 136 times
Been thanked: 65 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: 739
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 136 times
Been thanked: 65 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

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

Re: Terminal issue

#41 Post by GarryRicketson »

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
Yes, that is correct on the newer Debian versions, However, my opinion only, but I think it is rather naive, and silly to not set a root password when installing.
If something goes wrong, like it did with the OP here, and "sudo" is not working correctly, one needs to have that option, to be able to use "su", and login as root, if they did not set a root password, it is some what more complicated to get root access, all though still possible, I never can understand why so many people like to make things more complicated, not having a root password, nor being able to use 'su', can make things more complicated.
It does nothing to improve security by not having a root password, if some one wants to access the system, as root , it is still very much possible, and in some ways, "sudo" makes it easier. For example,... all I need is to know the username, and their password, then I can login as that user, "sudo", password, and do what ever I want, maybe edit the "fstab" file, just to be mean , or modify the sources.list so it includes ubuntu repos,...etc... :mrgreen:
Also a user that does not know what they are doing can do as much damage using "sudo", as they might using "su"....

arzgi
Posts: 1197
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Terminal issue

#42 Post by arzgi »

GarryRicketson wrote:
Yes, that is correct on the newer Debian versions, However, my opinion only, but I think it is rather naive, and silly to not set a root password when installing.
If something goes wrong, like it did with the OP here, and "sudo" is not working correctly, one needs to have that option, to be able to use "su", and login as root, if they did not set a root password, it is some what more complicated to get root access, all though still possible, I never can understand why so many people like to make things more complicated, not having a root password, nor being able to use 'su', can make things more complicated.
How would sudo break? Or any other pacgkage. If using stable Debian, there might not be any other reason than wrong configuration, and that can be fixed.
GarryRicketson wrote:
It does nothing to improve security by not having a root password, if some one wants to access the system, as root , it is still very much possible, and in some ways, "sudo" makes it easier. For example,... all I need is to know the username, and their password, then I can login as that user, "sudo", password, and do what ever I want, maybe edit the "fstab" file, just to be mean , or modify the sources.list so it includes ubuntu repos,...etc... :mrgreen:
Also a user that does not know what they are doing can do as much damage using "sudo", as they might using "su"....
Security is so much wider subject, than using sudo or root. I've seen people who have their root password on post-it sticker attached to monitor. Years ago there was even a distro, where by defaut was only root account. I don't remember which it was, probably it is no more available.

I don't think it's a security thiing when i use sudo. When did you last change your root password? Since I know my password is the only in this system, I change it often, it's long and difficult, but because I use it many times a day, I soon learn it and I don't need to write it on paper or rile. And I have installed some security packages. If I would take my laptop out of home, I would crypt some partititions.

Your last line, I think it is not sudo's fault- But it is true, user should understand the difference of root and user, sudo gives root privileges for 5 minutes (default).

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1410
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 70 times

Re: Terminal issue

#43 Post by None1975 »

arzgi wrote:Years ago there was even a distro, where by defaut was only root account. I don't remember which it was, probably it is no more available.
And now there are such. For example Arch Linux and Gentoo (by default). Even in Debian you can not add a user if you want. The system will be the only administrator user. Everything in your hands.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

arzgi
Posts: 1197
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Terminal issue

#44 Post by arzgi »

None1975 wrote: Even in Debian you can not add a user if you want. The system will be the only administrator user. Everything in your hands.
Err, maybe you meant something else that you wrote? There are adduser and useradd at least.

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1410
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 70 times

Re: Terminal issue

#45 Post by None1975 »

arzgi wrote:Err, maybe you meant something else that you wrote? There are adduser and useradd at least.
Each Gnu/Linux system has such a tool (adduser and useradd). Apparently, in your specified system, there was such a tool, but it was not clear.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

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

Re: Terminal issue

#46 Post by GarryRicketson »

Even in Debian you can not add a user if you want.
Yes you can
Image
=== edited===
I have never seen any Linux, Bsd, or Unix, that root could not add users to the system, but have seen some that do not automatically set up a non root user account, in other words , the base install is just "root" as the default user,..but even on those, the install documentation recommends setting up a "non administrative" user, immediately, it is generally one of the first things one needs to do after the initial install. Most , installers now a days, do include the option to setup a normal user account, but one does not have to do that.
Just saying,..

==============
How would sudo break? Or any other pacgkage. If using stable Debian, there might not be any other reason than wrong configuration, and that can be fixed.
I apologize, worded that badly, maybe "break" or "broken" is not the right way to say it, but what I meant, for example, a wrong or bad configuration, or something, there have been several threads where the user could not get sudo to work, and in at least 1 , we had to explain how to boot as single user, and set a root password , so the user can log in as root, and start repairing the problem.
Even in this thread, when the OP started, in order to run the usermod command, they needed to use 'su', to modify how they had sudo set up.
Yes, I agree normally using "sudo", instead of all ways logging in as root, is better, etc,... just saying it is a good idea to set a root password, and have that setup correctly as well, just in case for some reason sudo does not work.
=== edited again===
to remove the previous edit.
Last edited by GarryRicketson on 2018-08-09 16:51, edited 1 time in total.

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1410
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 70 times

Re: Terminal issue

#47 Post by None1975 »

GarryRicketson wrote:
Even in Debian you can not add a user if you want.
Yes you can
Yes you are right. I wanted to write that you can create a user. There was a technical error. Forgive me.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

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

Re: Terminal issue

#48 Post by GarryRicketson »

No problem, and it is true, a regular user can not add users to the system, adding users must be done either using sudo or su, as far as I know,...
So any user not in the sudoers group, would not be able to add users.

arzgi
Posts: 1197
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Terminal issue

#49 Post by arzgi »

None1975 wrote:
arzgi wrote:Err, maybe you meant something else that you wrote? There are adduser and useradd at least.
Each Gnu/Linux system has such a tool (adduser and useradd). Apparently, in your specified system, there was such a tool, but it was not clear.
So what is the logic? He uses sudo, can't be Debian?

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Terminal issue

#50 Post by debiman »

4 pages of hit-and-miss because op didn't follow the advice given in the first reply?
GarryRicketson wrote:This has been asked a few 100 times on this forum, here is 1;
http://forums.debian.net/viewtopic.php? ... doers+file

Post Reply