Terminal issue

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

Re: Terminal issue

Postby 3hre » 2018-08-08 02:53

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

Re: Terminal issue

Postby cds60601 » 2018-08-08 03:08

Chromium?
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 03:11

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

Re: Terminal issue

Postby 3hre » 2018-08-08 03:22

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

Re: Terminal issue

Postby GarryRicketson » 2018-08-08 03:31

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

Re: Terminal issue

Postby cds60601 » 2018-08-08 15:21

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
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 17:21

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

Re: Terminal issue

Postby cds60601 » 2018-08-08 17:38

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.
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 18:09

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-if-package-is-installed-in-linux/
==========
https://wiki.debian.org/sudo
User avatar
GarryRicketson
 
Posts: 5162
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Terminal issue

Postby cds60601 » 2018-08-08 18:13

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
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 18:39

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

Re: Terminal issue

Postby arzgi » 2018-08-09 08:36

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).
arzgi
 
Posts: 389
Joined: 2008-02-21 17:03
Location: Finland

Re: Terminal issue

Postby None1975 » 2018-08-09 13:12

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 9.5 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 672
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Terminal issue

Postby arzgi » 2018-08-09 13:56

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.
arzgi
 
Posts: 389
Joined: 2008-02-21 17:03
Location: Finland

Re: Terminal issue

Postby None1975 » 2018-08-09 14:34

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 9.5 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 672
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

PreviousNext

Return to Beginners Questions

Who is online

Users browsing this forum: peter_irich and 14 guests

fashionable