user

DirectAdmin user and password

I've had to test some connectivity issues with pop and imap clients without having access to their account info.

"/etc/virtual/{domain.tld}/passwd" file holds their user and md5 password hash. Make sure to backup this file first.

Generate a new md5-based password hash:

openssl passwd -1

Edit "/etc/virtual/{domain.tld}/passwd" file replacing the password hash with the above.

Test login to mail.

Once debugging is finished, restore the file back.

getent to check user and group

To check is user or group exist in passwd and group file:

getent passwd <user_name>
getent group <group_name>

You could also grep the corresponding files, but this is a much cleaner way of getting entries from administrative database where database is one of aliases, ethers, group, hosts, netgroup, networks, passwd, protocols, rpc, services or shadow.

Comment