Public bug reported: When generating a report on a remote host, sosreport will prompt for a password if a non-root user is provided.
In my case, the user being provided does not require a password for running sudo commands, and so a fake password needs to be entered here. Can a check be introduced so that the sudo command is only requested if it's needed? The command for reference: $ sos collect --all-logs --clean --nodes $node --ssh-user $user --debug --ssh-key /home/$user/.ssh/id_rsa sos-collector (version 4.1) This utility is used to collect sosreports from multiple nodes simultaneously. It uses OpenSSH's ControlPersist feature to connect to nodes and run commands remotely. If your system installation of OpenSSH is older than 5.6, please upgrade. An archive of sosreport tarballs collected from the nodes will be generated in /tmp/sos.0b5dt5gj and may be provided to an appropriate support representative. The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No configuration changes will be made to the system running this utility or remote systems that it connects to. Press ENTER to continue, or CTRL-C to quit Please enter the case id you are collecting reports for: 12345 sos-collector ASSUMES that SSH keys are installed on all nodes unless the --password option is provided. A non-root user has been provided. Provide sudo password for ubuntu on remote nodes:^C Also, this host is running Ubuntu 20.04.2 (from cat/etc/os-release), and here's verification of the current sosreport version: $ apt-cache policy sosreport sosreport: Installed: 4.1-1ubuntu0.20.04.1 Candidate: 4.1-1ubuntu0.20.04.1 Version table: *** 4.1-1ubuntu0.20.04.1 500 500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 100 /var/lib/dpkg/status 3.9-1ubuntu2 500 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages Thanks for your time! ** Affects: sosreport (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1923646 Title: A prompt for a sudo password isn't always required To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/1923646/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs