Skip to content

Commit fb71531

Browse files
committed
Added new hardenend sudoers commands
1 parent 184f709 commit fb71531

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

content/en/docs/cluster/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ After running a job the client program executes the `tools/cluster/maintenance.p
7171
This script is run as root and thus needs to be in the `/etc/sudoers` file or subdirectories somewhere. We recommend the following:
7272

7373
```bash
74-
echo "${USER} ALL=(ALL) NOPASSWD:/home/gc/green-metrics-tool/tools/cluster/maintenance.py ''" | sudo tee /etc/sudoers.d/green-coding-cluster-maintenance
75-
echo "${USER} ALL=(ALL) NOPASSWD:/home/gc/green-metrics-tool/tools/cluster/maintenance.py --update-os-packages" | sudo tee -a /etc/sudoers.d/green-coding-cluster-maintenance
74+
echo "${USER} ALL=(ALL) NOPASSWD:$(realpath /usr/bin/python3) -I -B -S /usr/local/bin/green-metrics-tool/maintenance.py" | sudo tee /etc/sudoers.d/green-coding-cluster-maintenance
75+
echo "${USER} ALL=(ALL) NOPASSWD:$(realpath /usr/bin/python3) -I -B -S /usr/local/bin/green-metrics-tool/maintenance.py --update-os-packages" | sudo tee -a /etc/sudoers.d/green-coding-cluster-maintenance
7676
sudo chmod 500 /etc/sudoers.d/green-coding-cluster-maintenance
7777
```
7878

content/en/docs/cluster/power-saving.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Please choose the line that is appropriate for you depending on if you want to s
5858
Example:
5959

6060
```bash
61-
echo 'ALL ALL=(ALL) NOPASSWD:/usr/bin/systemctl suspend' | sudo tee /etc/sudoers.d/green-coding-shutdown # for systems that support suspend
62-
echo 'ALL ALL=(ALL) NOPASSWD:/usr/bin/systemctl poweroff' | sudo tee -a /etc/sudoers.d/green-coding-shutdown # for systems that only can shutdown
61+
echo "${USER} ALL=(ALL) NOPASSWD:/usr/bin/systemctl suspend" | sudo tee /etc/sudoers.d/green-coding-shutdown # for systems that support suspend
62+
echo "${USER} ALL=(ALL) NOPASSWD:/usr/bin/systemctl poweroff" | sudo tee -a /etc/sudoers.d/green-coding-shutdown # for systems that only can shutdown
6363
sudo chmod 500 /etc/sudoers.d/green-coding-shutdown
6464
```
6565

@@ -70,9 +70,9 @@ In rare circumstances Wake-On-Lan is not active on the machine.
7070
Check the following:
7171

7272
- Check the BIOS if Wake-On-Lan is enabled.
73-
+ If no option is present it might not be configurable through the BIOS
73+
+ If no option is present it might not be configurable through the BIOS
7474
- Check `$ sudo ethtool <YOUR_INTERFACE>`
75-
+ Output should list: `Wake-on: g`
75+
+ Output should list: `Wake-on: g`
7676

7777
If the value is `d` it is disabled. You can activate it temporarily until the next suspend / reboot with: `$ sudo ethtool -s <YOUR_INTERFACE> wol g`
7878

0 commit comments

Comments
 (0)