add_email.sh - Adding hashes is not supported!

Echo

Verified User
Joined
Nov 23, 2022
Messages
8
Hi all!

This is my first post on the forum, but I've spent a lot of time on the forum to answer many of my questions about DA.
A lot of reading. :-)

Currently, I am working on migrating smoothly from cPanel to DA and I have a DA server that will be used only for emails.

To migrate the mailboxes of my customers, I can't ask them for their passwords, it will be a waste of time and problems.

While testing, I found that I could use the encrypted email password that is in cPanel (/home/$user/etc/$domain.com/shadow) and put it in DA (/etc/virtual/domain.com/passwd). It works, I log in to the DA Rouncube without any problem with the password.

So I was thinking of using /usr/local/directadmin/scripts/add_email.sh to create the mailboxes and then do an rsync to import the messages, but I get this error message when I run add_email.sh "Adding hashes is not supported!".

Code:
./add_email.sh testmail mydomain.com '$1$yGXHFSZS$3UhjcWOu3PDQb09G/yV2I/' 0 0

Adding hashes is not supported!


Does anyone have any idea what the problem is?


Otherwise, I would have liked to use the cPanel to DA migration feature and only transfer the emails, but I don't seem to have a choice. It transfers everything.
 
Hello,

Does anyone have any idea what the problem is?

The script which you try to use does not support hashes. It prints out: Adding hashes is not supported!

The script uses API for creating email accounts, and API does not support it. The simplest solution would be to create email accounts with a random password and then manually or with a help of a custom script to update passwords to your existing hashes. Passwords are stored in text files: /etc/virtual/<DOMAIN>/passwd
 
Hello zEitEr,

The script which you try to use does not support hashes. It prints out: Adding hashes is not supported!

That makes sense (unfortunately).

Actually, I was hoping I was missing something because in the documentation it said "the cryptedpass can either be an MD5/DES password".


The simplest solution would be to create email accounts with a random password and then manually or with a help of a custom script to update passwords to your existing hashes.

I will explore this solution.
Thanks for your answer!
 
Back
Top