apt-get confussion

Matthew1974

New Member
Joined
May 2, 2019
Messages
5
Reaction score
3
Credits
15
My Linux machine has two users root and matthew, I keep the passwords written in a text file so that I know I'm not making a spelling mistake (maybe a security issue, but that's not related to my question).

I was logged in as matthew and I wanted to install nano, so I typed.
sudo apt-get install nano

This didn't work. I tried it several times double checking that all the passwords were correct and being confused.

I logged in as root and typed.
apt-get install nano

This worked first time, I've even openned nano as root as well as openning nano whilst being logged in as matthew, so nano is most definitely installed.

Can anyone explain why the installation didn't work for the log in matthew using sudo?
 


@Matthew1974 - welcome to the forum!

sudo can get very granular, for instance you can add a user to sudoers and allow him to do anything, or limit them to just one (or a few commands).


Here's a short video that may help you out..
 
Everyone should not be able to run sudo, only people who you want to have root privileges. You should never log in as root, unless absolutely necessary as you can make mistakes that screw the system up totally. So put matthew in the sudoers file and when you need to install something sudo will work.
 
  • Like
Reactions: Rob

Members online


Latest posts

Top