In a speech marking the eve of the Muslim Eid al-Fitr holiday, Salman, 80, also cautioned young people against "the dangers that lie in wait, notably extremism".
He said the country "is determined to strike with an iron fist all those who want to harm the spirit and orientation of our youth".
More than half of Saudis are under 25 and some have proclaimed allegiance to the Islamic State group of jihadists.
The holiday is celebrated by Muslims worldwide to mark the end of the holy fasting month of Ramadan.
Also Read
Salman was commenting the day after a suicide bomber in Medina killed four police outside the Prophet's Mosque, Islam's second-holiest site.
The attack, which sparked condemnation across the Muslim world, coincided with another suicide blast in Shiite-dominated Qatif, in the kingdom's east, where the only casualty was the bomber.
Early yesterday a third suicide bomber wounded two policemen when he blew himself up near the United States consulate in Jeddah.
It has not identified the others, and there has been no claim of responsibility.
The IS group has previously claimed other attacks against Saudi security officers and minority Shiites.