My husband enlisted in the Navy for WWII and he has a photograph that is as you described. It is a picture of his basic training/boot camp graduating class. The military archives for service records will not have them but the history/archives of the base they were taken may have them or the Library of Congress. Also check the NARA's Military Collections, they might have the historical records/photographs of closed military installations. Also check the State Archives or County Libraries of the areas his bases were located.