As above could be loose connections on battery or starter motor. Inhibit switch to only allow you to start it in Park or Neutral is located by the auto lever. This feeds up to the rear of the ignition switch. Also uses the electrical signals to know what position the lever is in.
Also could be the switch on the rear of the ignition. I had this recently - starter didn't work but if I left the key turned for a bit it would suddenly start. Randomly wouldn't start sometimes. Cleaned the contacts on the switch. Problem solved. Had it before - caused reverse and brake lights to fail, only when the engine was running but ok with the engine oft. Could be the same thing on yours.
Not sure about the td4 auto as mine is a v6 but I guess it's the same setup.
Disconnect battery
remove plastic cover around steering column - 2 screws underneath
take plastic cover oft - splits in 2 parts - remove rubber ring round ignition key hole first
remove switch on the rhs - 2 screws
...make sure you don't let the silly white plastic thing jump out
...it's the auto gearbox position pin thing which only allows you to start it in P or N
...don't move the gear lever at this point or the plastic thing will fly oft
...that pin is spring loaded towards the clip - it's a sod to put the plastic think back if it fly's oft
take plastic cover off rear of switch - push clip things
clean contacts - may need to turn switch with a screwdriver to access some pins
...pins are the circular pattern at the top of the switch
put back together in reverse order
DSCN2854 FlFu40w
DSCN2855 O5aDmPu
DSCN2856 lCeWZvu
DSCN2856a KasBxsb
DSCN2858 JS05Lag
DSCN2866 fHizVew