This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wordpress_password_reset [2010/10/30 23:43] k2patel |
wordpress_password_reset [2020/08/10 02:35] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
# <Ketan Patel> k2patel@hotmail.com | # <Ketan Patel> k2patel@hotmail.com | ||
- | if [ $# -lt 2 ]; then | + | if [ $# -lt 2 ] |
+ | then | ||
echo "Usage: $0 <Blog Location> <new Password> [<Admin User>]" | echo "Usage: $0 <Blog Location> <new Password> [<Admin User>]" | ||
- | elseif [ $# -lt 3 ]; then | + | exit 1 |
+ | elif [ $# -lt 3 ] | ||
+ | then | ||
WPUser='admin' | WPUser='admin' | ||
- | else | + | else |
WPUser=$3 | WPUser=$3 | ||
fi | fi | ||
- | + | RESET="UPDATE wp_users SET user_pass=MD5('$2') WHERE user_login='$WPUser'" | |
- | RESET="UPDATE wp_users SET user_pass=MD5('$2') WHERE user_login='admin'" | + | |
cd $1 | cd $1 |