Earlier quoted context omitted.
Well, in tptacek's case, I believe he's a US citizen so they can't deny him entry.
Hmm. What would be the best practice for a foreign national?
Understand that you may be denied entry to any country but your own. It's a fact of life which you cannot do anything about, so you might as well accept it.
What I do is:
- travel with a machine which is not logged into any of my accounts
- if asked, I can honestly say that I do not know any of my social-media passwords (because they are all of the form mZOH05WaxeAWqI79myMxcx or SWwDmDOkyHCVdX8eOiTLXC1U1psffeXfFgNx6PaZZhp); if that's unacceptable to customs in any country, they can send me back home
- if they press, I can honestly say that my computer back home (not the computer I have with me) has my master password file, and that there is no other copy