Operating System - HP-UX
1836450 Members
2931 Online
110100 Solutions
New Discussion

What are invalid special characters for HP-UX ?

 
SOLVED
Go to solution
T.J. Yang
Frequent Advisor

What are invalid special characters for HP-UX ?

I know if a pasword contains characters like @ and #.
Is there a list of special characters that hp-ux login program will reject ?

I like to exclude those characters when making up password.

Thanks

tj
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: What are invalid special characters for HP-UX ?

Do a "man getty"; that will give you a list of characters to avoid. Most of them revolve around the default stty values before login has completed and stty has been called to set the values to more sensible characters. For example, upon initial login the erase character is '#' so that while '#' is not strictly illegal in the passwd, if you type "Top#Secret" what the host actually sees is "Topecret". After login, erase is set to something like BS. This goes back to the teletype days (which could not backspace) so that when a '#' was typed, it meant ignore the following character and the '#'.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: What are invalid special characters for HP-UX ?

Oh, and let me tell you about one more that should be avoided - a leading "-". This one almost drove me nuts; there is absolutely nothing wrong with a "-" but Microsoft's "improved" FTP client has this (undocumented) characteristic, if a leading "-" is detected in the password, it is silently striped so that "-TopSecret" is intrepeted as "TopSecret"; the workaround is two leading dashes so that you should enter "--TopSecret" to get "-TopSecret". Dashes anywhere else are fine and I've only seen this in Window's FTP client. And, of course, in keeping with the best Windows consistancy standards, other utilities like their telnet client did not strip the leading dash.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: What are invalid special characters for HP-UX ?

The login program doesn't reject any displayable characters. As Clay mentioned, there are specific characters that are assigned special meanings. The @ and # have historically been used for delete-line and erase. However, since patches for the ttyconf device file have been available, you can change the default @ and # character. If you issue this command:

stty erase "^H" kill "^U" < /dev/ttyconf

What this does is to change the driver defaults, something that was not possible before this patch. With the above line, the # and @ symbols are now usable at login (/etc/profile normally takes care of this but that's after login).

That said, you will always be limited by all the rules for all the systems that will be used together. For instance, if you use PCs, you'll have to know their special rules (like a leading - in ftp). The best recommendation is to use very few of the special characters in passwords. What works on HP-UX may fail on a Mac or AIX or a PC terminal emulator.


Bill Hassell, sysadmin