Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 57097b3

Browse files
committed
Added documentation about setting up passwordless sudo.
1 parent 1fd9bc8 commit 57097b3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

doc/user_manual.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,17 @@ files are not supported yet!
363363
.Selecting a remote machine for scanning
364364
image::scanning_remote_machine.png[align="center"]
365365

366+
The remote user doesn't have to be a superuser - you can setup the remote
367+
`/etc/sudoers` file (using `visudo`) to enable the paswordless sudo for that particular user,
368+
and you check the "user is sudoer" checkbox.
369+
370+
For example, if the scanning user is `oscap-user`, that would involve putting
371+
372+
oscap-user ALL=(root) NOPASSWD: /usr/bin/oscap xccdf eval *
373+
374+
user specification into the `sudoers` file, or into a separate file
375+
that is included by `sudoers` s.a. `/etc/sudoers.d/99-oscap-user`.
376+
366377
=== Enable Online Remediation (optional)
367378

368379
****

src/OscapScannerRemoteSsh.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ void OscapScannerRemoteSsh::processError(QString& message)
364364
{
365365
message.replace(QRegExp("^sudo:"), "Error invoking sudo on the host:");
366366
message += ".\nOnly passwordless sudo setup on the remote host is supported by scap-workbench.";
367+
message += " \nTo configure a non-privileged user oscap-user to run only the oscap binary as root, "
368+
"add this User Specification to your sudoers file: oscap-user ALL=(root) NOPASSWD: /usr/bin/oscap xccdf eval *";
367369
}
368370
}
369371

0 commit comments

Comments
 (0)