When a terminal is locked, you must play a puzzle to unlock it (if you have the prerequisite science level). The puzzle works by you getting four guesses to choose the password from the given words. If you guess wrong, the terminal will tell you how many letters you got correct (but not where). Unless you are absolutely sure, always back out of the terminal instead of making a fourth guess to avoid getting locked out. You can try again on the terminal and will just have to wait through about 5 seconds of typing before starting over. As mentioned before, this can be done in conjunction with "No Tumbler Fumbler" by hacking the terminal next to a locked door but then picking the lock. Should you fail a little too often, the Computer Whiz (Int 7, Science 70) perk will let you try again a few more times.