I have already sudo
-ed to an account, by running sudo su - <username>
and when I try to run apt
from this account I am getting the message:
[sudo] password for <username>:
which I don't have (!!!), since I was using sudo su - <username>
, in order to work on behalf of account <username>
, and without asking for password. Please note, that I don't have root or credentials for this server. Any help will be appreciated, since I am a bit newbie to sudo internals.
I have read this post, but it does not really shed any light and trying to read sudoers
, gives me Access Denied
Edit:
It turns out that apt-get
etc. cannot be located, not even by which, thus some more work needs to be done but will try to install.
Edit 2: I understand that the whole configuration, seems stupid to a lot of you, but that's what I was presented to operate with.
sudo su <user>
followed bysudo apt ...
butsudo apt ...
without changing to another user account. Why would you want to use this particular user account to execute something withsudo
? – noAnton Apr 10 '20 at 12:38sudo su - <username>
couldn't work. Trysudo -s
to be surprised. (Or if that fails,sudo su - root
.) – Chris Davies Apr 10 '20 at 12:38sudo apt-get
from my every account, gives me acommand not found
error, though – Yannis P. Apr 10 '20 at 12:51