Share This Article President James Buchanan held this rank during the War of 1812. Naval Captain Major General Private Brevet Major Private. Buchanan is the only president who served in the military that did not serve as an officer.