The best way to pass a drug test is to drink gallons of water every day in the days before the test ... and stop taking the drugs. The only drug that will always stay detectable for more than a few days is chronically-used marijuana because it is fat soluble and stored in fat tissues for long periods. Next up are the benzodiazepines in detectibility after time.
Opiates disappear in a few days at the standard federal cutoff level of 200 nano-grams/deci-liter. The opiate cutoff level was raised by a factor of ten because of all the "poppy-seed defense" cases that mucked up the system. At 200 ng/dl, an average 70-kg person could be ingesting maybe five milligrams a day of an opiate every day right up to the day of the test and still pass ... just do the math and see ... assume 70% bioavailability, a distribution volume of (guessing) 30 liters, and an equilibrium concentration level ... intake rate equals excretion rate.
Tramadol and nalbuphine do not show up in the standard opiate drug screen; they would have to do specific tests for those drugs and that would cost them extra money.
Benzos can stay detectable in your system for a few weeks, depending on what drug it is and how much you use it.
I don't know about how successful shaving your head would be to beat a hair test. They might be able to do a test on eyebrow hair. You might have to shave off all your body's hair. If anyone stoops that low, God help them. Pubic hair? How low could they go?
Me personally? I've never ever taken a drug test and wouldn't apply for a job that required it. But not all of us have that luxury.
The whole system depends on fear and intimidation. If enough people just said no to drug testing, they'd stop doing it except for the "safety sensitive" type of jobs that the federal government is allowed to test for. Any federal law enforcement officer with a gun and a badge should be able to pass a drug test ... and that seems reasonable.
But drug testing of federal employees is covered by the 4th Amendment. They need a reason for the "search" based on the job's responsibilities, access, etc. Most federal agencies are prohibited under the terms of a major federal court decision that banned blanket drug testing of all job applicants. The case in question involved employees of the IRS in the U.S. Treasury Dept. The court decided that only "safety sensitive" jobs could be subject to blanket drug testing and random drug testing.
Some agencies have all of their employees considered "safety sensitive." For example: FBI, CIA, and NSA to name a few. Plus everyone who is under military orders ... including officers of the U.S. Public Health Service and the Coast Guard.
The President (????!!!???) and all his Cabinet officers have to take a drug test before taking office (this was stated in The New Yorker magazine). I have no idea what would happen if we elected a President who failed the drug test. It would be pretty funny, though. He'd have from Election Day to Inauguration Day to dry out ... i'm not sure i'd want a President who couldn't abstain for that long ... or who didn't have a scrip for what he's taking.