The Emergency Fleet Access Program was a security program installed within Federation Starfleet vessels.
This system was employed in times of war or emergency where situations might mean that ships can sometimes lose their command crew or vice versa. Starfleet therefore established a procedure in order to ensure a quick shift in command authority from ship to ship. This allowed command to be transferred to another senior officer who gained complete control over the ship's computer.
In situations where there was never a previous commander listed in the computer, then the Emergency Fleet Access Program gave command authority to the next senior officer, but this was only effective for an interim period while it sought confirmation from Starfleet Command. Till then, the officer who initiated the program was recognized as acting captain of the vessel allowing certain limited actions in preparations for assuming full command.
Captain Jean-Luc Picard initiated Emergency Fleet Access Program Alpha Alpha One Alpha while on board the Mirror Universe created USS Voyager as the Klingon-Cardassian Alliance replicated the vessel without taking into account the computer programs already present within its systems. This allowed him to bypass Gul Rutal's controls and attempt to free his captured crew.
During their use of the computer systems, the acting captain was required to enter their Emergency Fleet Access Code. (TOS novel: Spectre)