SAN FRANCISCO — Joshua Hedlund will soon be sentenced for his connections to an indoor marijuana farm in Berkeley where police found more than 5,000 plants.

Years before pleading guilty, though, he appeared in tax solo Zachary Epstein’s office as a young, clean-cut real estate developer on the make. Hedlund’s father had been a Humboldt County supervisor, and his grandfather, Earl Hedlund, was once district attorney in rural Tehama County.