A security blunder by the Ministry of Defence led to images containing sensitive information being released by St James's Palace.
The Day in the Life of Prince William pictures, showing him going about his job as an RAF pilot, displayed sensitive information on computer screens in the background of the images.
MoD technicians rushed to change computer passwords and usernames within hours of the global publication of the images.
A spokesman for the ministry said: "A number of photographs of Flt Lt Wales were taken whilst on duty as a helicopter search and rescue pilot at RAF Valley in Anglesey.
"Due to an administrative oversight, these photographs were not properly cleared at RAF Valley and the images showed unclassified MoD user names, passwords and computer screens on a restricted system.
"The passwords and usernames shown have now been reset as a precaution and we are satisfied the images do not contravene security regulations."
Pictures of the Duke of Cambridge show him hanging out with his fellow crew members, testing equipment and making his bed.
One shot shows William leaning back in his chair during a morning briefing. There is a computer in the shot that shows a password prompt scheme.
Another has the future king sitting at a computer, with a document on the desk next to him. There is also an email open on a computer behind him and an iPhone next to him.
A third shows passwords and usernames pinned up on a wall behind Prince William.
A spokesperson for St James's Palace said: "The pictures were taken by an RAF photographer and any security issues are a matter for the MoD. Four of the pictures had to be taken down for a period."