Join two accounts: keep emails passwords
I have a special need: merge two cPanel accounts. It's not difficult in general, but my only problem is regarding the email passwords of the original account.
Scenario:
- account1 (old) with about 180 email accounts
- account2 (new) with about 26 email accounts
Goal: to move the emails from account1 to the existing account2. Same server.
In general, I can:
- move the folder /home/account1/mail/domain1.com to somewhere
- delete account1
- create domain1.com as parked in account2
- move the folder domain1.com to /home/account2/mail/
- adjust the owner (chown) of the moved folder
It works, but I lose the passwords of the 180 email accounts, and since they are people in different places and situations, it's impossible to set a new password and inform each one.
So, I need a way to save the file or any other thing where the passwords are stored. I imagine it is a text file, or database, whose passwords are encrypted, but I imagine that just copying this data to the new account should not cause any problems (I believe that the encryption has nothing to do with the original account, correct?)
If you can give me an idea of how to do this, I would be very grateful.
Rogerio
-
I think the passwords are in
/home/CPANELUSERNAME/etc/DOMAIN.TLD/shadowanother file you probably need is
/home/CPANELUSERNAME/etc/DOMAIN.TLD/passwd0 -
Yes, thanks, that's a start.
The "shadow" file, each user is in the format:
<user>:<cripto-password>:<number?>::::::
What is this "number"?
The "passwd" seems to be related to ssh/terminal, which we don't use:
<user>:x:<userid>:<groupid>::<user mail path>:<account root path>
But, I have no way to test...
Does anyone know if just copying these lines is enough to recreate the email accounts directly, without using whmapi/cpanel?
0 -
Yeah, I forgot to ask to ChatGPT...
0
Please sign in to leave a comment.
Comments
3 comments