"Mr Foster would be in his seventies now if still alive, but it would be fun to return his card if anyone can shed any clues," says the posting, which has since been shared 14,000 times.
The New Zealand Defence Force (NZDF) has now tracked down Foster, aged 72.
"Members of Mr Foster's family were made aware of the posting and got in contact with the Royal New Zealand Navy, and provided the Navy with a contact phone number," an NZDF spokesman said this afternoon.
"The contractor who discovered the ID card while dredging Pearl Harbour has put the card in the mail to the New Zealand Defence Force.
"The Royal New Zealand Navy will make arrangements for a representative to return the card to Mr Foster when it arrives."