The inability to properly cover tracks proved to be a significant break for the F.B.I. When the bureau opened an investigation into the breach last year, agents followed the trail of the intrusion directly to the computer that had been used at the residence in Jupiter.

Whoever gained access to the network is believed to have done so by logging in as Jeff Luhnow, the Astros’ general manager, or Sig Mejdal, whose title is director of decision sciences. Both officials joined the Astros from the Cardinals. The intruder or intruders examined the Cardinals’ network and determined the passwords that Mr. Luhnow and Mr. Mejdal had used when they were with the Cardinals. Using those passwords, they gained access to the Astros’ network.

The slip-up in masking the location was similar to one that hackers made last year when they broke into Sony Pictures’ networks before the premiere of the film “The Interview,” a comedy about a plot to kill North Korea’s leader, Kim Jong-un. The hackers posted many of Sony’s emails and other internal communications online, embarrassing the company’s executives. While the hackers took many steps to cover their tracks, American cybersecurity officials were able to find an instance in which they did not properly mask their location, enabling President Obama to publicly identify the North Korean government as the culprit and impose sanctions.

“The North Koreans knew what they were doing but made a mistake; the guys under investigation just weren’t very competent,” said one of the people briefed on the investigation.

As baseball has experienced revolutions in technology and statistics in many ways, it remains relatively unsophisticated in others. Franchises have tried to develop elaborate information-sharing platforms in recent years, but they have increasingly relied on young and inexperienced programmers and analysts, like the ones now under investigation in the Cardinals’ front office.

While paying players exorbitant salaries, teams maintain small budgets for their front offices, often leading to the hiring of analysts and programmers right out of college. Those workers, who are paid significantly less than what they could make at a technology company or a start-up, are often enticed by the opportunity to work in baseball in a front-office position.

Because the technology skills of many scouts, coaches and executives are limited, the analysts and programmers have been given significant leeway in building programs, and until now there has been little pressure to put tight security in place. One team executive said he had not changed his password for his team’s network in three years.