The main mistake made in taking a passport photo is just aiming a regular camera with a pop-up flash at the person and taking a picture. This will inevitably violate the rule about shadows on the background. It may also cause shadows on the face and may also alter the tone and color of the picture.
In order to get a usable passport photo, you'll need to go with a studio-like setup. Don't worry, you don't have to buy a lot of equipment. A few household items will allow you to get a quality passport photo without building a home photography studio in your basement.
First, you want to avoid using the flash at all. So, set your digital camera to one of the manual modes that allow you to control the flash, or set your flash to "off" instead of auto. Sunlight and overhead lights are going to cause shadows on the face. Instead, go to the brightest room in the house (or other location), preferably one with big windows. Don't use windows with the sun streaming into them. If your best room has west facing windows then take your photos in the morning while plenty of light is coming in, but the sun isn't directly shining into the room.
For the backdrop, a white sheet will do. The only catch is that it needs to be a plain white sheet with no pattern, not even the lightly embossed patterns which will show up in the picture. Set the backdrop so the subject is facing the windows at an angle. You want the light to illuminate the subject without casting a shadow across the face from the nose. Also, the photographer needs to be positioned so that they do not cast any shadow on the subject. So, play with the angles until there is little or no shadow from the nose (you'll get rid of any remaining shadow with the lights.)
Now, you'll need to get your passport photo in Photoshop to finish it out.