I found a solution that worked for me. It took me two steps, and all credit to BocaBoy in this thread: Re: Mojave installation fails: duplicate App Stores, can't sign in with Apple ID (Macbook Pro, Late 2016)
- Disable System Integrity Protection:
- Reboot the computer into restore mode (press command-R during startup)
- Select Terminal from the Utilities... menu
- Enter csrutil disable and press return
- Restart
- Back up and archive the folder in /Library/Security/Trust Settings before deleting them through Terminal. I'll copy BocaBoy's instructions here for you all:
OK, I just spoke with Apple engineering and they gave me a fix for this. It worked for me and it may work for you. You must know how to use Terminal and access hidden directories with Finder in the root of your drive.
First, make SURE that you've backed up the directory /Library/Security/Trust Settings. Copy it on your Desktop or Downloads directory, or wherever you'll be able to access it.
1. Again, back up the user certificate trust settings files described above. Then, remove them with the following commands, entering your administrator password when prompted:
cd "/Library/Security"
sudo ditto -ck "Trust Settings" TrustSettingsBackup.zip
cd "/Library/Security/Trust Settings"
sudo rm *.plist
2. Attempt to sign into the App Store.
This didn't work for me until I restarted at which point I was able to log in and see all of my accumulated updates. If you're not comfortable working at the system level, DON'T do this. If you are, this may fix your problem. It did for me.
Once you're sure that you've got the App Store working, you can delete the TrustSettingsBackup.zip file as well as the backup of the Trust Settings directory.
3. Reenable System Integrity Protection by repeating step 1 but using the command csrutil enable.
After I modified the Trust Settings directory, I was able to reboot and connect to the App Store and Books Store.
Good luck, everyone!