Operating System - HP-UX
1833259 Members
3625 Online
110051 Solutions
New Discussion

password_min_special _char

 
SOLVED
Go to solution
Elena Leontieva
Esteemed Contributor

password_min_special _char

Hello,

I wonder if all special characters can be used in a password, specifically the "#" sign?

One user complained that if she has a "#" in a password the system would not let her log in.

Thanks,
Elena.
5 REPLIES 5
Mel Burslan
Honored Contributor
Solution

Re: password_min_special _char

# can not be used as well as @ in passwords as they have special meaning to the terminal sessions.
________________________________
UNIX because I majored in cryptology...
Sp4admin
Trusted Contributor

Re: password_min_special _char

Hi Elena,

Mel has provided the correct answer. You can't use "@ and #" as a special characters in the password.

sp,
James R. Ferguson
Acclaimed Contributor

Re: password_min_special _char

Hi Elena:

In fact, the restrictions are documented in the 'getty(1M)' manpages under "BUGS":

http://www.docs.hp.com/en/B2355-60127/getty.1M.html

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: password_min_special _char

Actually, it is not quite true that # and @ cxannot be used in a password. The reason that they are not recommended is that the default stty settings have #=backspace @=cancel. It's been that way for about 20 years in HP-UX. However, a change was (quietly) made to the terminal drivers to enable the use of a new device file: /dev/ttyconf. This device file will set selected control character to new defaults. Now when you login, there is an stty statement in /etc/profile that 'fixes' the archaic default but prior to login, the login and password are processed with the defaults.

So to fix this, you simply use stty with the /dev/ttyconf file as in:

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

Now, a new login will be able to use the normal backspace key and passwords can contain # and @. To make this change permanent, create a start/stop script in /sbin/init.d and add that statement to the script. Note that the console login is special -- the device file is never closed so the new settings, even if enabled at the beginning of the boot process, will use the default setting.


Bill Hassell, sysadmin
Elena Leontieva
Esteemed Contributor

Re: password_min_special _char

Special thanks to Bill for his reply.