Changing Password text (passwd command)

Latest response

I'm running RHEL 7.3. I have a question about the passwd command.
I'm trying to change the text that the user is promoted with when they are asked for their current password.

When running passwd, RHEL displays:

Changing password for user *****
Changing password for *****
(current) UNIX password: ___________

In my circumstance, I'm looking to replace the word UNIX above with the HOSTNAME of the server.

Can this be done?

Thank You!

Responses

You'd likely need to modify the source code for the passwd utility itself.

This is certainly possible, but you need to decide if it's worthwhile in lieu of a more practical solution, such as modifying your shell prompt to include the hostname.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.