mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 11:02:59 +00:00
docs: update sudo configuration to a more restrictive variant (#1001)
Signed-off-by: Daniel Schlosser <8429638+Eusebius1920@users.noreply.github.com> Co-authored-by: Daniel Schlosser <8429638+Eusebius1920@users.noreply.github.com>
This commit is contained in:
parent
f8004b0e2a
commit
6bd8ba566a
@ -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.
|
||||
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user