diff --git a/man/en/sos-collect.1 b/man/en/sos-collect.1 index ba083f372..e3100bfc8 100644 --- a/man/en/sos-collect.1 +++ b/man/en/sos-collect.1 @@ -74,8 +74,7 @@ This does NOT enable all sos collect options. Become the root user on the remote node when connecting as a non-root user. .TP \fB\-\-batch\fR -Run in non-interactive mode. This will skip prompts for user input, with the -exception of a prompt for the SSH password. +Run in non-interactive mode. This will skip prompts for user input. .TP \fB\-\-all\-logs\fR Report option. Collects all logs regardless of size. diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py index 5eeba2570..d66b0ec54 100644 --- a/sos/collector/__init__.py +++ b/sos/collector/__init__.py @@ -1194,6 +1194,14 @@ def execute(self): self.intro() + if self.opts.batch and self.opts.password: + self.exit( + "\nsos-collector was called with incompatible options --batch " + "and --password.\nIf you need to use --password," + " please omit batch mode.\n", + 1 + ) + self.configure_sos_cmd() self.prep() self.display_nodes()