If I read the code in
account.py correctly, it takes
account_id from the directory name and compares it with the account ID from the JSON files.. And produces an error if it doesn't match, including what it should be..
So safe to say you can rename the directory in
/etc/letsencrypt/accounts/ to the name
certbot found for you in the JSON files? I guess?
But perhaps someone with deeper knowledge of these things can agree or disagree with me on this subject.
Ah, I understand. The JSON files themselves don't have the account ID embedded in them, the code just calculates the account ID from information in the JSON files (just the public key to be exact):
self.id = hashlib.md5(
And it checks this hash with the found account ID (i.e., the name of the directory).