Problem was, his teammates couldn't score.
Greinke (3-0) improved to 21-1 with a 1.88 ERA in 31 games against division opponents since joining the Dodgers as a free agent before the 2013 season. He is 15-0 in his last 19 starts against NL West teams.
The right-hander is 5-0 with a 1.58 ERA in nine career starts against San Diego.
Cashner (1-3) allowed two runs and six hits in seven innings, struck out six and walked one. He has gone 20 straight starts at Petco Park without allowing more than two earned runs.
"It felt good. I thought I finally located my fastball much better," Cashner said. "I thought the biggest mistake of the game was the changeup in the seventh."
That was the pitch Crawford hit deep into the seats in right field for his first homer, giving the Dodgers a 2-0 lead.
Cashner has allowed four home runs this year, all to the Dodgers. He gave up three to Adrian Gonzalez at Dodger Stadium on April 8.
"I think I've had a pretty good amount of success against him. I just had that one bad game where I just left the ball down the middle," Cashner said. "But every guy in their lineup can hit the ball out. You just have to make pitches."
Said Padres manager Bud Black: "I think the story tonight was Greinke pitching really well, just mixing pitches, doing what he normally does. He has the ability to keep the ball down with movement at the bottom of the strike zone.
"Cash was fine," Black added. "I like his mix of pitches as well. A good changeup, good fastball velocity when he needed it, a good slider. He pitched good, too."
Los Angeles rookie Yimi Garcia pitched the ninth for his first major league save.
The Dodgers snapped a three-game losing streak while San Diego lost its third straight. The Padres, who came in tied for the second-most runs in the majors, have gone 14 straight innings without scoring.
Greinke loaded the bases with no outs in the second by walking Yonder Alonso and allowing singles to Derek Norris and Will Middlebrooks. Greinke promptly got out of the jam by striking out Alexi Amarista and Cashner, and getting Wil Myers to line out to second baseman Howie Kendrick.
Greinke allowed only a single and two walks the rest of the way. The Padres had runners on first and second with two outs in the fourth before Greinke got Cashner to pop up to second.
The Dodgers took a 1-0 lead in the second when Juan Uribe singled in Yasmani Grandal, aboard on a one-out double. Grandal, acquired from San Diego in the Matt Kemp trade, paused and watched his drive as if he thought he homered. The ball landed in the left-field corner just in front of the fence.
Joc Pederson hit a sacrifice fly in the ninth.
Dodgers: RF Yasiel Puig came up limping after running out a grounder in the sixth inning and left with what the team said was a re-aggravated left hamstring. He was replaced by Andre Ethier. In the second, Puig was hit on the left knee by a pitch from Cashner.
Dodgers: Brandon McCarthy (2-0, 4.50 ERA) goes into Saturday with a 5-1 record and 2.96 ERA in seven career starts against San Diego.
Padres: RHP Ian Kennedy will be activated from the 15-day disabled to start against the Dodgers. He's been out since straining his left hamstring during the home opener on April 9 against San Francisco.