Last active
December 31, 2022 00:35
-
-
Save henkin/73645f4f53bd28c484af95a5adf29b67 to your computer and use it in GitHub Desktop.
ddwrt
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
user=user | |
password=`openssl passwd -1 -salt xyz your-password-here` | |
cp /etc/passwd /tmp/passwd.bak | |
echo "${user}:${password}:1000:1000:User,,,:/tmp/${user}:/bin/sh" >> /etc/passwd | |
mkdir /tmp/${user} | |
chmod 1000:1000 /tmp/user |
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
#!/bin/sh -x | |
# -x shows all commands | |
exec > script.log 2>&1 | |
echo "do this" | |
touch that | |
echo do more | |
# + echo 'do this' | |
# do this | |
# + touch that | |
# + echo 'do' more | |
# do more | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment