[sos-devel] sos collect: becoming root without password

Jake Hunsaker jhunsake at redhat.com
Tue May 18 13:57:57 UTC 2021


--become means "once on the node, actually become the root user, don't 
use sudo". Akin to running "su - " yourself. It's for scenarios where 
sudo is not configured for the ssh-user.

If you drop --become, then collect will use sudo for the commands 
requiring root privileges, and the `--nopasswd-sudo` option is used to 
skip the prompt for the sudo password.

On 5/18/21 9:23 AM, Adrian Moreno wrote:
> Hi,
>
> I'm trying to run "sos collect" (4.1) to ssh into my node and gather the logs as
> root.
>
> I'm doing so by running:
>
> sos collect --become --ssh-user heat-admin --nopasswd-sudo --nodes ${NODE_IP}
>
> But sos prompts me for the root password of user "head-admin" in the node:
>
> sos-collector ASSUMES that SSH keys are installed on all nodes unless the
> --password option is provided.
>
> User heat-admin will attempt to become root. Provide root password:
>
> Isn't "--nopasswd-sudo" supposed to mean "I don't need password to use sudo"
> (which is my case)?
>
> I'm sure I'm missing something, can someone help me out?
>
> Thanks

-- 
Jake Hunsaker
RHCA Cloud Specialist
Senior Software Engineer, CEE Engineering
Red Hat




More information about the sos-devel mailing list