Sudo Flow #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sudo Flow | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
# env: | |
# SSL_CERT_DIR: "/home/mitmproxyuser/.mitmproxy/" | |
jobs: | |
sudo-flow: | |
name: Sudo Flow | |
runs-on: ubuntu-latest | |
steps: | |
- run: ps aux | |
- run: sudo useradd agent | |
- run: sudo mkdir /home/agent | |
- run: sudo chown -R agent /home/agent | |
- run: sudo usermod -aG sudo agent | |
- run: sudo cat /etc/sudoers | |
- run: sudo cp /etc/sudoers /tmp/sudoers.bak | |
- run: sudo echo "agent ALL=(ALL) NOPASSWD:ALL" | (EDITOR="tee -a" sudo visudo) | |
- run: sudo cat /etc/sudoers | |