I don't think you should wait 2-3 weeks to confront him. You know he's been in your house without your permission, confront him now.
Tell him you know he's been in your house and on your computer without your permission and he is no longer welcome.
Don't tell him you know he's been downloading porn (whether you do or not), if he has been doing something he shouldn't, he'll get really nervous anyway.
So just go ahead and change the codes and passwords and tell him he's not welcome in your house anymore.
I wouldn't even tell your friend you changed all your codes and passwords. If you feel someone should have them in case of emergencies, give them to someone else you trust.
|