Operating System - HP-UX
1833852 Members
1898 Online
110063 Solutions
New Discussion

error message when changing password

 
SOLVED
Go to solution
Elena Leontieva
Esteemed Contributor

error message when changing password

Hello,

When a user changes a password and tries to use some special character like "#" or "@" he gets back a generic message:

New password:
The password entered is not valid. Valid passwords must contain at least:
1 upper case character(s),
1 lower case charcter(s),
1 digit(s), and
1 special character(s).

I wonder, is it possible to display a more specific message?

Thanks,
Elena.
15 REPLIES 15
Paul Sperry
Honored Contributor

Re: error message when changing password

@ and # are special characters and are not allowed in hp-ux passwords.

@ symbol is a special symbol that is interpreted as: IGNORE anything prior

I forget what # was
Paul Sperry
Honored Contributor

Re: error message when changing password

# is the erase charcter I believe
Michael Steele_2
Honored Contributor

Re: error message when changing password

Re: "...wonder, is it possible to display a more specific message?...".

No.

# and @ are reserved for getty. I think # pound means backspace and @ means ignore or backspace also. (* caveman unix stuff that's still hanging around *).

You can try putting a '/' in front of the # or @. This is also standard unix.

! works as does :.

Support Fatherhood - Stop Family Law
OldSchool
Honored Contributor

Re: error message when changing password

from "man" page for passwd:

WARNING
Avoid password characters which have special meaning to the tty driver, such as # (erase) and @ (kill). You may not be able to login with these characters.

========================================

Notes:
# erase a previously typed character, one per "#"

@ erase everything previously typed.

This behaviour is not related to the output of "stty -a"...and AFAIK, can't be modified. you might be able to "escape" it with a "\" prior, as in asd\#912, but I'm not certain about that.
OldSchool
Honored Contributor

Re: error message when changing password

better still, from "man getty":

While getty does understand simple single character quoting conventions, it is not possible to quote the special control
characters that getty uses to determine when the end of the line has been reached, which protocol is being used, and what the erase character is. Therefore it is not possible to log in by means of getty and type a #, @, /, !, _, backspace, ^U, ^D, or & as part of your login name or arguments. They will always be interpreted as
having their special meaning as described
Robert-Jan Goossens
Honored Contributor

Re: error message when changing password

Hi Elena,

You would like to change the message to someting like?

The password entered is not valid. Valid passwords must contain at least:
1 upper case character(s),
1 lower case charcter(s),
1 digit(s), and
1 special character(s).
Do not use the special characters @ and # in your password!

Robert-Jan
Elena Leontieva
Esteemed Contributor

Re: error message when changing password

Robert-Jan,

Yes, can I add to this message what characters they should not use?

Thanks,
Elena.
Robert-Jan Goossens
Honored Contributor

Re: error message when changing password

searching....
Paul Sperry
Honored Contributor
Solution

Re: error message when changing password

On a non-trusted system those messages are hard-coded into the passwd command and cannot be changed
Paul Sperry
Honored Contributor

Re: error message when changing password

Robert-Jan Goossens
Honored Contributor

Re: error message when changing password

No Elena, it is hardcoded into the commands. Look in Paul's thread, Jeff has an idear of a wrapper. Or you could try to log a case and ask for a patch :)
Mounaam
Trusted Contributor

Re: error message when changing password

(from HP-UX System Administrator's Guide):
---8<---
As many users discover to their frustration, UNIX was originally developed on TeleType machines that had no backspace operation. Consequently, the process of editing input data was performed by printing characters: #, delete one character and @, delete the line. Interrupt was defined as Rubout (ASCII DEL). This situation has carried over to the process of logging in to a system. #, @, and DEL are still the HP-UX default login control characters today.
--->8---

You can change this default behavior by configuring /dev/ttyconf.

Take a look to http://www.docs.hp.com/en/5992-3386/ch02s03.html
Elena Leontieva
Esteemed Contributor

Re: error message when changing password

This is HP-UX 11.11 trusted system. Does it make any difference?

Thanks a lot for all your responses.
Bill Hassell
Honored Contributor

Re: error message when changing password

No, a Trusted System does not affect these special characters. They are part of the terminal driver defaults (and have been for 20 years) so standard login tools and setups will inherit this setting. These two characters are changed immediately after login in /etc/profile or .profile with stty commands. The link above from Mounaam provides the solution for all systems starting at 10.01 and higher. Just put the 1-liner in inittab for ttyconf and the problem disappears:

ttco::bootwait:/sbin/stty intr ^C erase ^H kill ^U < /dev/ttyconf

http://www.docs.hp.com/en/5992-3386/ch02s03.html

At the bottom of the page.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: error message when changing password

>Paul: On a non-trusted system those messages are hard-coded into the passwd command and cannot be changed

This may not true for 11.23. Just change /usr/lib/nls/msg/C/passwd.cat, message 91

> This is HP-UX 11.11 trusted system.

Ok, that won't help you.