With Solskjaer having departed as manager after the 4-1 embarrassment at Watford last weekend, Michael Carrick was tasked with leading the Red Devils in their fifth Champions League group game of the season.
After a largely uneventful 77 minutes at Estadio de la Ceramica, in which Manu Trigueros and Jadon Sancho had the best of the chances, Cristiano Ronaldo lofted in his 799th senior career goal to put his side in front.
Sancho, who failed to score under Solskjaer, made certain of United's place in the knockouts with an emphatic finish at the end of a flowing counter-attack.
United fans sang boisterously in support of Solskjaer and Carrick as kick-off was delayed due to an apparent problem with the referee's communication system.
Scott McTominay headed into the side-netting but the best of the early chances fell to the home side, David de Gea saving from Moi Gomez and Yeremi Pino hitting the wrong side of the net from a loose ball.
De Gea saved superbly one-handed to tip away Trigueros' first-time shot before Ronaldo's first sight of goal saw him head straight at Geronimo Rulli from an Alex Telles cross.
Neither side seemed eager to force the issue but De Gea was called upon to make another brilliant save from Trigueros after a loose ball deflected to him in the United box.
Rulli saved well from Sancho as United began to look the more likely to find a winner, but the Villarreal keeper turned villain when his lazy pass was pounced upon by Fred, allowing Ronaldo to spin and lob the ball into the unguarded net.
Fred was again instrumental for the second, winning back possession to trigger a swift break involving Ronaldo, McTominay and Rashford, with Sancho applying a powerful finish.