Skip to content

Commit

Permalink
docs: [example][systemd] use DynamicUser=yes (rapiz1#186)
Browse files Browse the repository at this point in the history
This patch fixes a warning generated by some new version of systemd. Use
"User=nobody" seems to be considered unsafe. So maybe we need to fix it
in our example files.

● [email protected] - Rathole Client Service
     Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-09-03 23:38:43 CST; 1h 27min ago
   Main PID: 507903 (rathole)
      Tasks: 14 (limit: 76731)
     Memory: 6.9M
        CPU: 39.908s
     CGroup: /system.slice/system-ratholec.slice/[email protected]
             └─507903 /usr/local/bin/rathole -c /etc/rathole/hitmc.toml

Sep 03 23:38:43 <hostname> systemd[1]: Started Rathole Client Service.
...
Sep 03 23:39:25 <hostname> systemd[1]: /etc/systemd/system/[email protected]:7: Special user nobody configured, this is not safe!
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=969329
Link: trojan-gfw/trojan#612
Link: https://www.vvave.net/archives/fix-the-systemd-error-special-user-nobody-configured-this-is-not-safe.html
  • Loading branch information
inclyc authored Sep 4, 2022
1 parent 881701d commit 67182fb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/systemd/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
User=nobody
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/rathole /etc/rathole/%i.toml
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/ratholec.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
User=nobody
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/rathole -c /etc/rathole/rathole.toml
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
User=nobody
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/rathole -c /etc/rathole/%i.toml
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/ratholes.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
User=nobody
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/rathole -s /etc/rathole/rathole.toml
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
User=nobody
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/rathole -s /etc/rathole/%i.toml
Expand Down

0 comments on commit 67182fb

Please sign in to comment.