I am not a system engineer (I am more a software developer). I have the following problem trying to deploy an application on a Linux Centos system.
As the first operation, I need to install Java and perform some preliminary checks installing some tools. During this preliminary phase I performed this command:
sudo yum install redhat-lsb-core
I obtained an error like this one:
USERNAME is not in the sudoers file. This incident will be reported
So I suspect that this user is not a root user or it is not allowed into the /etc/sudoers file. Is it? What can I check to ensure this suspect?
Using this user I also tried to do:
cat /etc/sudoers
and I obtained:
cat: /etc/sudoers: Permission denied
Performing:
grep 'x:0:' /etc/passwd
I obtained:
[email protected] [~]# grep 'x:0:' /etc/passwd
root:x:0:0:root:/root:/bin/bash
So I think that there is only a root user that is not the one that I am using.
So do you think that the only solution is to ask the person handling this server to give me permission to execute sudo
command?
/etc/sudoers
using a proper user with admin rights, sosu cat /etc/sudoers
and/orsu nano -w /etc/sudoers
to edit it and add the user. Until they are properly added you will have to usesu
and enter the root password to get access.sudoers
file, that's the job of thesudo
tool and the error you get saysUSERNAME is not in the sudoers file
so it can read the file but your user isn't in there. You need to get your user in there first.