Answering your question: depending on how the password is stored is possible, but unsafe and not at all advisable.
For this to be possible you would need:
- Your password is stored unencrypted in the database
- An alleged "admin" should have a way to query users and be able to see the password.
The above two items should be inconceivable in any system.
Alternatively what can be suggested:
- Use secret questions to release password reset.
- Use personal data for password recovery (personal documents, date of birth, sex, family name) or even a combination of them.
- And a scenario I’ve seen a lot in old corporate systems: administrator(s) who has (in) access to reset the person’s password if they identify themselves. Within a corporation this is even possible since you can easily identify a person by using license plate and other internal resources.
The 3 items above are not yet advisable, but are not as bad as having access to the password. Note that all options should always be to reset the password and never query. Even those who have access to the system database should not know what the password of the users.
How would you ensure that the user who is trying to recover the password is the owner of the password? The purpose of the email or sms is precisely this. The question is outside the scope because it is not really a question related to programming. You basically want an idea for your system.
– Roberto de Campos