If the sentence was all alone in the universe, then it could be ambiguous. But that's fine, because I'm guessing it doesn't exist alone. Depending on the sentences before and after it, it should be clear whether he was allowed into the room where the computer was or whether he received a password for it.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.