Created
August 29, 2017 08:18
-
-
Save luoyjx/e6d8f475f38e5299656a8fe3943b2539 to your computer and use it in GitHub Desktop.
shell 请求提权
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/bash | |
user=`whoami` | |
if [ "$user" != "root" ]; then | |
echo "You Password" | su root | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment