My wife came to be the recipient of a used Wal-Mart mountain bike that she likes. The bearings badly needed adjusting, but I did not have the proper cassette removal tool and did not want to buy one just for this job. So I improvised.
I tapped a screwdriver against the retaining ring on the cassette to loosen it and removed several sprockets and spacers. This gave me enough clearance to reach the locknut on the axle and the top of the spacer collar. There was no way to tighten the locknut against the collar enough to guarantee the bearing cone would not drift into the bearings later, especially given the direction of the cone threads and of rotation on the bearings.
I welded a piece of a 16 penny nail to the side of the spacer collar and filed flats on the other end of the collar. I had to grind the thickness of the nail down a little so the cassette can turn without rubbing on it. But, I was able to get a cone wrench onto the flats of the collar and tighten enough that the bearing cone will not move. Even if it should try to move, the tip of the nail will keep the cone from moving.