A small PHP commandline script to change passwords for DA users, or e-mail addresses, or FTP accounts. This script can reset either all accounts, or a single domain, or a single (DA/e-mail/ftp) user.
This script will attempt to download the following required file if it is not found in the same directory. But you can manually download it as well:
http://files.directadmin.com/services/all/httpsocket/httpsocket.php
If $usesmtp
is set to Y
, the PHPmailer package is required.
Make sure all options are checked and, where needed, updated. All options have a short explanation behind it that explains its function. If you enable the $sendemailtouser
option, then also check and update the 3 $mailbody
and $mailsubject
combinations. Once done, set $scriptedited
to Y
.
This script can be executed locally on a DirectAdmin server, but can also connect to (any) DirectAdmin server from a remote location. This is useful if you manage many DirectAdmin servers.
./da_changepass.php --user <username> [optional password]
If no password is given, a random one will be generated
./da_changepass.php --alluser
./da_changepass.php --allmail
./da_changepass.php --mail <domainname>
./da_changepass.php --mail <e-mail address> [optional password]
If no password is given, a random one will be generated
./da_changepass.php --allftp
./da_changepass.php --ftp <domainname>
./da_changepass.php --ftp <ftpuser@domain> [optional password]
If no password is given, a random one will be generated
./da_changepass.php --list <ftp | mail> [optional domain]
./da_changepass.php --mailtest