I've shortened one before. If you use a lathe to cut it, true it and weld it make sure you spray all the ways (shinny parts that slide) on the lathe with soapy water to keep the cherries from the welder sticking. Then you can kind of balance on two true straight edges.
To lengthen one in a lather you can cut the weld just inside of the weld to the adapters. Make sure you get seamless tube to replace it. If not it will have a weld seam inside the length of the tube and make it very hard to balance.
Best bet Google a drive shaft shop.