Scenes of computer hackers trying to crack someone's password are very common today, but when you think about those scenes only work because the audience are aware that computers are secured using passwords, and securing computers with a password is a rather new thing when compared with the history of cinema. So the question becomes, which movie (or TV episode) was the first to portray a computer system secured using a password (documentaries don't count)?
The first I found in Subzin is from WarGames (1983). Here's the first mention:
00:19:52 - You're really into computers, huh? - Yeah.
00:19:59 - What are you doing? - I'm dialing into the school's computer.
00:20:14 They change the password every couple of weeks, but I know where they write it.
00:20:32 - Are those your grades?! - Yeah.
00:20:35 I don't think that I deserved an F, do you?
Here's a screenshot:
00:25:35 They might have changed the password.
00:32:15 I put in a password that only I know about.
00:35:32 so I could get his secret password.
00:36:18 If I could just get that damn password, I could play the computer.
00:52:28 The kid broke into the war game using a password left by the original programmer.
00:52:33 - A password? - Yes, sir.
00:52:43 We can find the password and take it out, but it might help to beef up security.
01:36:08 It's like the entire password file has been wiped out.
01:38:15 They've taken out my password.
I remember an episode of a detective series Simon and Simon about a boy who was hacking bank accounts on a bank system.
According to Google the episode is Trapdoors from 1981, script is here:
There is mention of passwords as part of trying to access systems.