the trust relationship between this workstation and the primary domain failed

The error “the trust relationship between this workstation and the primary domain failed” came up while trying to add a domain user to the administrator group on a local computer the other day.

the reason probably I got the error was because the computer I was trying to add to the domain had been out of the network for a long time, and somehow lost the trust to the domain.

Solution?

Rejoin the computer to the domain, and then add the user to the group.