Al-Shabaab has imposed a strict Wahhabi version of Islam in the areas under its control, and its fighters have stoned to death women accused of adultery, and punished alleged thieves by cut off their limbs.
Security is expected to dominate the run-up to the next election in February 2019, at which Buhari will stand for a second term. He promised to defeat Boko Haram but is now facing a series of security challenges elsewhere.
The kidnapping on February 19 of the girls aged 11-19, was the biggest mass abduction since Boko Haram took more than 270 schoolgirls from the town of Chibok in 2014 - a case that triggered international outrage.
Borno state is the epicenter of the Boko Haram insurgency which aims to create an Islamic state in northeast Nigeria. More than 20,000 people have been killed and some 2 million forced to leave their homes since 2009.
Residents said attackers entered Magumeri, around 50 km (30 miles) from Borno state capital Maiduguri, around 7:00 p.m. (1800 GMT). They said the insurgents shot sporadically and threw explosive devices, prompting locals to flee to a forest.
It was not immediately clear which faction of Boko Haram was responsible for the attack. Hit-and-run raids were often used by fighters loyal to Abubakar Shekau when they began to take over swathes of territory in remote rural areas.