Take permission of TTE before boarding the train.. If all 5 tickets are booked together TTE may allow.. Since, the ticket does not get cancelled automatically if booked online, only if all 5 tickets are booked together..
If the ticket of 5th passenger is booked seperately then he is NOT allowed to travel in Rajdhani train if ended in WL.