Operating System - HP-UX
1848417 Members
3045 Online
104027 Solutions
New Discussion

Re: Problem in setting the password.

 
Ranjith_5
Honored Contributor

Problem in setting the password.

Hi Gurus,

HPUX 11iv2 with SSH installed
==============================
I am using putty software to connect to server using a SSH2 session. Now I am reseting the password of a user oracle using

#/usr/lbin/modprpw -x oracle
password=kjduirwe

I am using the above password to login with oracle next time. It prompts to change the password. I have a complex password policy, which includes special characters also.

Here When I am trying to set a password containing # or @ with 8 characters long. But I am getting the following error.

Password too short - must be at least 6 characters

I wonder why I am getting this error even after providing a password having 8 characters.

At the same time, I also observed that I can set the same password if I am logging in as root and try from the # prompt.

Any idea about this funny behaviour?

Thanks in Advance..
Syam
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Problem in setting the password.

Certain special characters have special meaning to the shell and should be avoided in passwords, particularly # (erase) and @ (kill). See "man passwd", in particular, the "WARNINGS" section.


Pete

Pete
Ranjith_5
Honored Contributor

Re: Problem in setting the password.

Hi Pete,

I am able to set the special passwords from the root login. But why not during the first login time of the respective users. Any Idea?

Regards,
Syam
Pete Randall
Outstanding Contributor

Re: Problem in setting the password.

When you enter these special characters, they affect what has previously been typed. For example, if you try to type the password kjduir#e, what the system actually ends up seeing is kjduie. That is why you are not supposed to use them in passwords.


Pete

Pete
Ranjith_5
Honored Contributor

Re: Problem in setting the password.

Hi pete,

As I mentioned I am able to use # in passwords if I am changing the users passwords from the root login.

My requirement is , the user should be able to set his own password during his first login. This is not happening.

Any idea why this works in the root prompt and not during the login time.?


Regards,
Syam
Stephen Keane
Honored Contributor

Re: Problem in setting the password.

Have a look at the ouput of
# stty -a

for root and normal users, you'llprobably find that the @ character is mapped differently between them. It may be set for eol for example.

Bharat Katkar
Honored Contributor

Re: Problem in setting the password.

Hi,
@ will actually erase out all previous inputs. for e.g. if you type "abcd@xyz" then it will only take xyz and not the entire string.

Becuase by default @ is used for kill. You can have a look at "stty -a" output to know what special characters are used and configured for.

Regards,

You need to know a lot to actually know how little you know
Ranjith_5
Honored Contributor

Re: Problem in setting the password.

Hi ,

Thanks for your inputs.

Following is the stty -a output. Do I need to change any values? If yes how do I go about.

#stty -a
speed 38400 baud; line = 0;
rows = 44; columns = 125
min = 4; time = 0;
intr = ^C; quit = ^\; erase = DEL; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crts
-ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop
#

Regards,
Syam
RikTytgat
Honored Contributor

Re: Problem in setting the password.

To change stty setting for eol:

$ stty ^@ ^K

Sets the eol to ^K. The '^' character is literal, you do noy use the 'Ctrl' key.

Regards,
rik
Bharat Katkar
Honored Contributor

Re: Problem in setting the password.

Hi Syam,
For changing kill and eol:

# stty kill
# stty eol ^A

This should work.
Regards,
You need to know a lot to actually know how little you know