Does the lens focus on something closer? What kind of adapter do you use? I assume its an m42 lens. Because some adapters prevent infinity focus. This holds for thick adapters and adapters with a flange. The genuine Pentax m42 adapter allows infinity focus, as do all other brand adapters of similar size.
If it has a flange or collar, then it probably won't allow infinity focus, but it should allow near focus. Though, with some lenses, that makes them virtually useless. Feel free to search the forum for threads about m42 adapters, as there have been many, some discussing bad adapters and others pointing out good cheap ones.
Another problem could be optical quality. For example, if the lens is flaring badly, if the optical elements are not aligned properly, if there is haze inside, etc.
The third type of problem is technique: if you are overexposing, using a shutter that is too long (because the moon moves surprisingly fast when you have a focal length like that), using a light tripod that doesnt steady the long lens, etc.
its probably the adapter