I've just finished modifying a Micro-Nikkor 55mm to use with my K10d. I've already modified a Nikkor 105mm lens, but the 55mm (and its accompanying extension tube) was really a breeze to modify.
It took me about 1 hour to do, but boiled down, it really was just a 2 step process.
1) Sand (grind) down the aperture ring to make it thinner. The aperture ring comes out further than the mount, so it will be jammed up against the camera.
2) Cut a notch in the mounting ring for the retention pin on the camera. Once this notch is made, there's no way for the lens to pop off on its own.
Only needed three tools:
1) Jeweller's screwdrivers
2) Dremel tool (with cut-off wheel)
3) Orbital sander (or belt sander)
Here's the culprit:
The first thing to do is remove the screw that's in the aperture ring:
Then remove the 5 screws from the mounting ring:
That's the extent of unscrewing that needs to be done. Now the mounting ring as well as the aperture ring can be removed.
There are two things to remember when putting the mounting ring and aperture ring back when you're done. The first is that the first screw you removed will actually fit into a hole in a slot. This controls the aperture blades. The second is that there are two tabs that extend from the underside of the mounting ring. They will straddle another tab deeper in the lens. This is mainly important if you want to use the lens with a Nikon body. It's not crucial, but you may as well put it back the way it's supposed to go.
Next thing to do is determine where the notch should go. In the following picture, the lens on the left is the 105mm I did previously as a reference.
However, because Nikkor lenses aren't designed to fit on a K-mount body, each different lens will mount differently on the K10d. Best thing to do is to put back the mounting ring without the aperture ring with a couple of screws, mount it onto your Pentax DSLR and mark where the notch should go.
The 55mm was much easier to modify than the 105mm because I could get the entire mounting ring off. This way, all you need to do is use a cut-off wheel to make the notch.
The width of the notch needed is just over 2mm.
Next thing, use the orbital sander to grind down the aperture ring so that it doesn't go further than the mount.
When that's done, replace any lubrication (I used a bit of bearing grease), reassemble and test it out!