Arduino Uno as a programmer for AVR chips
Your clock setup sounds very odd. If you have an external crystal already, you should not connect anything but that crystal to the XTAL pins.

There are some different cases of “not showing proper device ID”:


If it shows a sequence of plausible hex digits that just are not the device ID of the device you’re programming, search in avrdude.conf for what device ID they DO represent. Sometimes it’s just a minor variation of the device you thought you had.
As a special case, if you’re getting the device ID for an ATmega328p, avrdude was actually talking to the MCU in your Arduino, not the target MCU. You need to disable auto-reset on your Arduino.
If you’re getting a value like 0x00 0x00 0x00 or 0xFF 0xFF 0xFF, your connections are not working properly yet.