![]() That password is then used to escalate privileges at the remote host after authenticating with the user specified in "remote_execution_ssh_user". Sometimes it is helpful to have a user that you can use sudo with - without having to enter the users password all the time. ![]() Assuming it works, unset a root password and disable password login. change 'foo' the the name of your key and enter your server root password when asked. Description of problem: To be able to run commands that require escalated privileges (sudo), it is currently required to set sudo rule NOPASSWD for the SSH. My suggestion is to add another setting, e.g: On the client : From the client, Transfer the key to the server. Remote_execution_effective_user_method: sudo In the settings for REx (Administer -> Settings -> RemoteExecution) there are currently 3 settings concerning user and privilege escalation: We recommend editing the sudoers file with visudo as it. Notice that you have to set "test-user ALL=NOPASSWD: ALL" in your sudoers config To set up password-less sudo, all we need to do is edit the sudoers file and add a few entries. Setup REx with a user that is not root, e.g. Version-Release number of selected component (if applicable): 6.2.12ġ. From then on, it should work like a charm. 3 Answers Sorted by: 19 Follow these steps: Edit sudoers file (this can be present in /etc/sudoers. Enable sudo without password redhat WebRun this command to mount the root directory. ![]() On Ubuntu 16, there is a simpler way: just add the user to the sudo group, like this: sudo usermod -aG sudo username. passwordless sudo) is not acceptable in all environments and therefore it would be useful to be able to provide a password used for privilege escalation at the remote host.Īs a reference, this would be similar to the "-ask-become-pass" option in Ansible. As mentioned by Basilevs you need to add your user to the sudoers file in order to avoid that sudo commands in the script get stuck awaiting the password. (For Red Hat IdM users, the same thing can be achieved with a sudo rule with the sudo option "!authenticate".) To be able to run commands that require escalated privileges (sudo), it is currently required to set sudo rule "NOPASSWD" for the SSH user on the target host. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |