There are no relative clauses here. Only #1 is correct, but it's unnatural and wordy. This should do the trick: He was given the password to the security system.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.