After checking everything in the machines I came to know that this is not the machine issue but the server. We have had one policy configured on the server which would have ensured if no one would log in to the machine with domain account till 2 weeks it will automatically delete machine account from domain and after that if anybody would log in to the system with his domain ID will see the error as "The Security database on the server does not have a computer account".
Thus if you see this error while log in with domain ID, You need to check whether this account exist in the domain active directory if not then simply go to the machine and join it again in domain. In order to do that follow the steps stated below
1. Put the computer in any workgroup and restart the machine
2. Rejoin in specified domain.
Please comment if you are not sure how to do it.