This will or has happened to all of us at some point. It could come in many forms, inheriting a project without login details or the client might not be in a position to remember their login details. The problem varies from client to client and project to project.
If you have access to the database, you can create an admin user by executing the following SQL script:
If you have access to the WordPress installation but not the database, check out this function you can paste to create a new user for yourself.