My gym has a smith machine and weights besides lot of machines. I am wondering if one can do the 5x5 program effectively with just the smith machine. I get the bench press and incline for your chest, but what about squats and deadlifts and rows?
Smith machines are made for squats so you're pretty safe using it for the intended purpose. :) You can also do bent-over rows easily, but the deadlift would require a change to form (the weight wouldn't be traveling straight up and down). Poor form with a deadlift can easily result in injury so I'd recommend against it.
I'm of the mindset that a Smith machine is better than nothing, but understand what a Smith machine does, and what it takes away from the exercise:
One of the benefits of doing squats, deadlifts, overhead presses, etc. without a machine is the opportunity to work your stabilizer and supporting muscles more effectively. You lose a lot of that with the Smith machine.
The question I have for you is, are there no barbells at all? If not, is there another alternative gym available to you?
If there are barbells, but need help for ideas of how to do the lifts you need while standing you can either "Clean" the weight for a front squat and overhead press, or you can perform the Steinborn lift for back squats.
If there are no barbells, then when you are gym shopping make sure they have:
With that you can do any 5x5 program from beginner to advanced.