Skip to content

Instantly share code, notes, and snippets.

@henkin
Last active December 31, 2022 00:35
Show Gist options
  • Save henkin/73645f4f53bd28c484af95a5adf29b67 to your computer and use it in GitHub Desktop.
Save henkin/73645f4f53bd28c484af95a5adf29b67 to your computer and use it in GitHub Desktop.
ddwrt
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
#!/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