diff options
-rw-r--r-- | man/en/sos-collect.1 | 4 | ||||
-rw-r--r-- | sos/collector/__init__.py | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/man/en/sos-collect.1 b/man/en/sos-collect.1 index 49e7fae3..42c7e8bd 100644 --- a/man/en/sos-collect.1 +++ b/man/en/sos-collect.1 @@ -16,7 +16,7 @@ sos collect \- Collect sosreports from multiple (cluster) nodes [--encrypt-pass PASS]\fR [\-\-group GROUP] [\-\-save\-group GROUP] - [\-\-insecure-sudo] + [\-\-nopasswd-sudo] [\-k PLUGIN_OPTION] [\-\-label LABEL] [\-n SKIP_PLUGINS] @@ -166,7 +166,7 @@ with the settings for cluster-type, master, and the node list as discovered by c Note that this means regexes are not directly saved to host groups, but the results of matching against those regexes are. .TP -\fB\-\-insecure-sudo\fR +\fB\-\-nopasswd-sudo\fR Use this option when connecting as a non-root user that has passwordless sudo configured. diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py index 05a9a6c1..26b146cc 100644 --- a/sos/collector/__init__.py +++ b/sos/collector/__init__.py @@ -62,7 +62,7 @@ class SoSCollector(SoSComponent): 'save_group': '', 'image': '', 'ssh_key': '', - 'insecure_sudo': False, + 'nopasswd_sudo': False, 'plugin_options': [], 'plugin_timeout': None, 'list_options': False, @@ -256,7 +256,7 @@ class SoSCollector(SoSComponent): 'containerized hosts. Defaults to the ' 'rhel7/support-tools image')) parser.add_argument('-i', '--ssh-key', help='Specify an ssh key') - parser.add_argument('--insecure-sudo', action='store_true', + parser.add_argument('--nopasswd-sudo', action='store_true', help='Use when passwordless sudo is configured') parser.add_argument('-k', '--plugin-options', action="append", help='Plugin option as plugname.option=value') @@ -598,7 +598,7 @@ class SoSCollector(SoSComponent): % self.opts.ssh_user) self.opts.password = getpass(prompt=msg) - if ((self.commons['need_sudo'] and not self.opts.insecure_sudo) + if ((self.commons['need_sudo'] and not self.opts.nopasswd_sudo) and not self.opts.batch): if not self.opts.password: self.log_debug('non-root user specified, will request ' @@ -608,7 +608,7 @@ class SoSCollector(SoSComponent): % self.opts.ssh_user) self.opts.sudo_pw = getpass(prompt=msg) else: - if not self.opts.insecure_sudo: + if not self.opts.nopasswd_sudo: self.opts.sudo_pw = self.opts.password if self.opts.become_root: @@ -644,12 +644,12 @@ class SoSCollector(SoSComponent): local_sudo = None skip_local_msg = ( "Local sos report generation forcibly skipped due " - "to lack of root privileges.\nEither use --insecure-sudo, " + "to lack of root privileges.\nEither use --nopasswd-sudo, " "run as root, or do not use --batch so that you will be " "prompted for a password\n" ) if (not self.opts.no_local and (os.getuid() != 0 and not - self.opts.insecure_sudo)): + self.opts.nopasswd_sudo)): if not self.opts.batch: msg = ("Enter local sudo password to generate local " "sos report: ") |