Born Shmuel Poznanski in Warsaw, Yanai came to Mandate Palestine, by himself at the age of 14. He studied at the Technion — Israel Institute of Technology and settled in kibbutz Neve Eitan in the Beit She'an Valley
In 1941 Yanai joined the Palmach, and in 1943, entered their naval group. The Naval Group grew, and towards the end of World War II became the Palmach's 10th Company, better known as the Palyam. When the Palmach was organized into battalions, the Palyam was attached to the Palmach's Staff Battalion (the 4th Battalion).
Samek served in Company 'A' and was commander of two illegal immigration ships, Haviva Reik, which sailed from Piraeus on May 28, 1946 and arrived in Palestine on June 8, 1946 with 462 passengers, and Henrietta Szold, which sailed from Piraeus along with a second, smaller boat named Rafi (commanded by Palyam member Arieh (Kipi) Kaplan), and arrived in Palestine on August 12, 1946 with 536 passengers. The engines on Henrietta Szold failed and Rafi towed it to the Syrna Island Gulf, where they were delayed a few days until the problem was fixed. On nearing Haifa, the British intercepted the boat and the British destroyer HMS Ajax, best known for defeating the Admiral Graf Spee at the Battle of the River Plate, rammed the ship. British soldiers then soldiers boarded, fought and captured the passengers and transferred them to Tent Camp No. 55 near Famagusta, on Cyprus. The Haganah escorts remained with the immigrants during the first deportation phase and escaped the detention camp with the help of 'Mossad Aliyah Bet'.
From 1947 until the Israeli independence, he served as commander of Palyam as commander of the first Israeli Navy Flotilla, composed out of four illegal ships. On March 17, 1948 the Naval Service (precursor of the Israeli Sea Corps) was established and the Palyam members were ordered to join it.
On August 24, 1948, Yanai commanded “Hashoded” operation at sea. Two Israeli corvettes took over the Arjiro, a ship loaded with weapons and ammunition on its way to supply Arab forces. The cargo was transferred to the Israeli forces fighting the War of Independence. The Arjiro was sunk.
In 1951 Yanai studied at the Technion. In 1952 he began his studies at M.I.T. and in 1954 obtained an engineering and management master's degrees, becoming one of the first I.D.F officers to study academically abroad. In 1954 he returned to serve at the Navy. In 1955 he headed a mission of Naval officers to Britain, overseeing the upgrade of two “Z”-class destroyers purchased from the U.K., a benchmark in the Israeli Navy transition to a better equipped naval force.
After leaving the Navy, he was one of 9 founding members of "Tzevet", the first I.D.F. veterans organization. Between 1963-1965 he served as the third "Tzevet" chairman. In the 1960s he worked under Tel Aviv-Yaffo's mayor Yehoshua Rabinovtch developing the city's outskirts: Hayarkon bridge; "Menashiya"; "Shikun Lamed" and "Ramat Aviv Gimmel" neighborhoods. In the late 60's he operated a deep sea commercial fishing enterprise from Eritrea, importing fish to Israel via the Red Sea and Eilat. In 1970-1986 he developed residential and commercial real estate projects in Eilat and other parts of Israel.
From 2000-2008 he served as the chairman of the Atlit Museum of Illegal Immigration.
From 1998-2005 he organized meetings and symposium of Palyam veterans, immigrants, and British Navy officers.
In 2000 Yanai started "Hasfinot Shebadereh", a publishing company. In 2001 he published with Yosef Almog and the Palyam Fund a book titled "The Gates Are Open, Collection of Memories, Clandestine Immigration". The book contains 194 Hebrew articles written by Ha'apala & Palyam operatives or their family members, detailing their part in the Ha'apala operations. Twenty three additional English language articles were written by Canadian and U.S. operatives.
In 2006 "Hasfinot Shebadereh" published the Hebrew language book "Facing the Locked Gate, The Odyssey of the Illegal Immigrants of Knesset Israel", Illustrated by Shemuel Katz and written by Tehila Ofer. The author and illustrator were both young immigrants on "Knesset Israel".
In 2003 he was the entrepreneur and historical adviser of Gan Ha'apala, located at the western end of Bugrashov street overlooking the Tel Aviv seashore. The site commemorates Ha'apala operations and was built with a donation by Sir Ronald Cohen and his wife Lady Sharon Harel-Cohen, in memory of Sir Ronald's father, Michael Cohen.
In 2009 he was the first recipient of the Yossi Harel Award, awarded by the Yossi Harel Fund to persons who significantly contributed to the commemoration of Ha'apala.
- Yannai (Poznanski) Samuel (Samak), Son of Yeheskel Palmach Members, Palmach Information Center
- The Palmach and The Palmach Museum Official site of Palmach and Palmach Museum in Tel Aviv
- Palyam Official site of Palyam (mainly Hebrew, but English section)
- Jerusalem Post article: Grapevine: Honoring the past by celebrating in the present
- Aliyah Bet Voyages Aliyah Bet Voyages, part of the Aliyah Bet Project, includes pictures and details of the boats of Aliyah Bet, ports of origin, dates of sailing, dates of arrival in Palestine and the number of immigrants on board. The page entitled List #2 1945 -1948, includes details of both boats, the Haviva Reik and the Henrietta Szold, commanded by Shmuel Yanai
- The Darien Dilemma, People in the Film