Sniffing out phony back pain

What is the best way to differentiate between a patient who has legitimate back pain and someone who is looking for a drug prescription or workers' compensation?