Skip to content

Commit

Permalink
docs: update sudo configuration to a more restrictive variant (#1001)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schlosser <8429638+Eusebius1920@users.noreply.github.com>
Co-authored-by: Daniel Schlosser <8429638+Eusebius1920@users.noreply.github.com>
  • Loading branch information
Eusebius1920 and Eusebius1920 authored Feb 4, 2024
1 parent f8004b0 commit 6bd8ba5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ You can configure the `sudo` privilege for the user via the command line on the
Add the following line to the end of the file:

```sh
terraform ALL=(ALL) NOPASSWD:ALL
terraform ALL=(root) NOPASSWD: /sbin/pvesm
terraform ALL=(root) NOPASSWD: /sbin/qm
terraform ALL=(root) NOPASSWD: /usr/bin/echo tfpve
```

Save the file and exit.
Expand All @@ -177,10 +179,10 @@ You can configure the `sudo` privilege for the user via the command line on the
- Test the SSH connection and password-less `sudo`:

```sh
ssh terraform@<target-node> sudo ls -la /root
ssh terraform@<target-node> sudo echo tfpve
```

You should be able to connect to the target node and see content of the `/root` folder without password.
You should be able to connect to the target node and see the output `tfpve` on the screen without being prompted for your password.

### Node IP address used for SSH connection

Expand Down

0 comments on commit 6bd8ba5

Please sign in to comment.