An FBI computer consultant gained access to the secret passwords of FBI Director Robert Mueller and others using free software found on the Internet, the latest embarrassment in the bureau’s long struggle to modernize its computers.

The consultant, Joseph Thomas Colon of Springfield, Ill., has pleaded guilty to four misdemeanor counts of intentionally exceeding his authorized computer access, and prosecutors are recommending roughly a year in prison.