

Unless you know what you are doing as far as root/ sudo access on a server goes and truly need the sudo access, it might be best you just let that stuff be handled by the people who know how to deal with root processes on that server.īut as for the specifics of sudo access, the root user needs to assign you as a sudoer in /etc/sudoers. However, some of the scripts that the maint menu will execute must be run as particular users in order to work properly. The script is basically a menu that allows maintenance personnel to do different things on the server. “I am not a system engineer (I am more a software developer).” The first time a sudo operation is called by a user, they are prompted to re-enter their password but if they call another sudo operation in the same command. 2 I am trying to setup a script that will be run as a 'maint' user.

#Allow a user to sudo as another user install#
Knowing that, it might be better if you just ask the person who is root on the server to run: yum install redhat-lsb-core Use su - to switch to root or su username, to switch to a different username. Your question is really an XY problem you seem to not need sudo access as much as you want to install redhat-lsb-core. (Switch User), change to a different user. That said, if you are a software developer and not in the /etc/sudoers file, just let the server admin install the packages you need installed. If you are not in the /etc/sudoers file, then you cannot run commands as sudo. Instead, just give the account permission to get to appuser, so they would sudo -su appuser (here, -su is two flags, -s -u ). So do you think that the only solution is to ask the person handling this server to give me permission to execute sudo command? asked at 14:58 overexchange 1,456 10 29 45 That sudo su - appuser is a horrendous security breach: you're giving full root access to the user who has permission to do that. So I think that there is only a root user that is not the one that I am using. Using this user I also tried to do: cat /etc/sudoersĪnd I obtained: cat: /etc/sudoers: Permission denied Is it? What can I check to ensure this suspect? So I suspect that this user is not a root user or it is not allowed into the /etc/sudoers file.
Then add that group to each user that you want to be able to su to that user without a password: usermod -a -GDuring this preliminary phase I performed this command: sudo yum install redhat-lsb-core I have the following problem trying to deploy an application on a Linux Centos system.Īs the first operation, I need to install Java and perform some preliminary checks installing some tools. This will allow you to run commands as the superuser, or root user. I am not a system engineer (I am more a software developer). There are a few ways to do this, but the most common is to use the sudo command.
