User Tools

Site Tools


wordpress_password_reset

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wordpress_password_reset [2010/10/30 23:20]
k2patel created
wordpress_password_reset [2020/08/10 02:35] (current)
Line 2: Line 2:
 #​!/​usr/​local/​bin/​bash #​!/​usr/​local/​bin/​bash
 # Wordpress Password Reset # Wordpress Password Reset
-# <Ketan Patel> k2patel@gmail.com+# <Ketan Patel> k2patel@hotmail.com
  
-if [ $# -lt 2 ]then +if [ $# -lt 2 ] 
-   echo "​Usage:​ $0 <Blog Location>​ <new Password>"​+then 
 +   echo "​Usage:​ $0 <Blog Location>​ <new Password> ​[<Admin User>]"
    exit 1    exit 1
 +elif [ $# -lt 3 ]
 +then
 +   ​WPUser='​admin'​
 +else
 +   ​WPUser=$3
 fi fi
  
-RESET="​UPDATE wp_users SET user_pass=MD5('​$2'​) WHERE user_login='​admin'"​+RESET="​UPDATE wp_users SET user_pass=MD5('​$2'​) WHERE user_login='​$WPUser'"​
  
 cd $1 cd $1
wordpress_password_reset.1288480838.txt.gz · Last modified: 2020/08/10 02:29 (external edit)