I think if you're just trying to build some muscle, and it's your only option, then by God, do what's safe.
If your objective is to build a big, bad squat, then the issue I see is that a squat is more of a front to back motion, and the Smith machine requires more of an up and down drive. I don't care for the way it torques my body in circa maximal movement, but that's just a personal opinion. Here's an old post on the "squat theory and execution" thread from Arioch, as this applies to strength athletes:
Certain misinformed and so-called “personal trainers” will have people squat in a smith machine, which is, quite simply, an idea both hideous and destructive. This is often done under the misguided “squat this way until you are strong enough to perform a regular squat” premise. Even if one overlooks the obvious fact that it is better to learn to do something right than build bad habits from the start, there are numerous other factors to be considered. The smith machine stabilizes the bar for the lifter, which does not teach the skill of balancing the bar, balance being important to any athlete, as well as the fact that free weight squatting strengthens the synergists which goes a long way to preventing injuries. A chain is only as strong as its weakest link, and the smith machine leaves far too many weak links. To say nothing of the fact that free weights provide a greater transfer of functional strength than machines. (23)Furthermore, the bar moves straight up and down, and very few people squat in this manner, which means that the smith machine does not fit a lifters optimal strength curve. (24) The smith machine also requires that the lifter either squats with his torso much closer to vertical than would be done with a real squat, which mechanically decreases the involvement of both the spinal erectors and the hamstrings. While this would be fine if it was done by the lifters muscular control, when the smith machine does this it is disadvantageous to the lifter by virtue of decreasing the ability of the hamstrings to protect the knee joint. Another mistake made, aside from simply using it in the first place, is allow the knees to drift forward over the toes, the chance of which is increased by the smith machine. As was previously mentioned, this greatly increases the shearing force on the knees. This from a device touted by the ignorant as “safe.”