Header Shadow Image


Linux: Resetting an MD5 hash for ssh or ftp login.

Just happened to have forgotten a password for one of my user accounts on my workstation and remembered a handy little thing one can do to reset a pass.

If you have root access, one can simply regenerate the MD5 hash with:

# openssl passwd -1 -salt mysalt
Password:
$1$mysalt$JyKGOJR1343sJ7N91hXVI/
#

# ftp localhost
Connected to localhost (127.0.0.1).
220 Welcome to the Crazy Town .  If you are not an authorized user, please logout now!
Name (localhost:root): tom
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.
#

and replace the existing hash string in proftpd or any other service with what ever is entered as a pass above.  This should help to reset your pass.

Cheers!
TK

Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

     
  Copyright © 2003 - 2025 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License

 

0
Would love your thoughts, please comment.x
()
x
The IT Development and Technology Mini Vault | MicroDevSys.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.