Operating System - HP-UX
1752330 Members
5720 Online
108786 Solutions
New Discussion юеВ

aging parameters does not work

 
Vishu
Trusted Contributor

aging parameters does not work

Hi,

i want to set the force aging for a user, but i am getting the following error.

vinay_root # passwd -x 0 sunita
Changing password for vinay
New password:
vinay_root #

each time i enter this command or for any other user, it ask to change the password for the user through which i logged into it. My system is not trusted. if any other way, i can change my aging to 0. plz help on this.

Thanks
9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: aging parameters does not work

Make sure you are using /usr/bin/passwd, /sbin/passwd has limited options.
/usr/bin/passwd -x 0 sunita
Vishu
Trusted Contributor

Re: aging parameters does not work

Well,

i also did with /usr/bin/passwd, but the result is the same.

plz suggest. Can i manually change the aging for this user in any file.
OldSchool
Honored Contributor

Re: aging parameters does not work

man password

http://docs.hp.com/en/B2355-90690/passwd.1.html

from 11v1 and up shows the x option used as:

password -r files -x o sunita

I believe at 11.0 and prior is as you noted it.

note that you are attempting to set the elapsed time that a password can remain unchanged, which I believe *means* never expire....

What OS and exactly what are you trying to accomplish?

if you want to force user to change password at next login, take a look at "-f" as in

passwd -r files -n 14 -w 7 -x 56 -f sunita

should force sunita to change password at next login, make him/her wait 2 weeks before changing it again, require that it be changed in the next 8 weeks, and begin warning that the password will expire 7 days befor it does.

note that the 14, 7 and 56 will be changed to weeks (divided by 7) prior to being used.

none of this applies to trusted systems.


Vishu
Trusted Contributor

Re: aging parameters does not work

The OS version is HP-UX B.11.00 and i dont want sunita to change the password at her next login. What i want is as per following switch with the passwd command.

-x max ------- Determine the maximum number of days, max, a password can remain unchanged. The user must enter another password after that number of days has transpired, known as the password expiration time. If the -f option was used in a previous invocation of passwd(1) to immediately expire a password, the effect of -f is cancelled; the password will not expire until max days. The effect of -f is not cancelled if -x and -f are specified on the same command line or if the system has been converted to a trusted system.

Plz suggest.
Steven E. Protter
Exalted Contributor

Re: aging parameters does not work

Shalom,

passwd -sa to see current status

passwd -x and -y set the maximum and minimum number of days to next password change.

If you set these figures to zero, that should stop password aging.

run passwd -sa after to be sure.

You might try using sam menu to change the behavior and checking the sam log for what command did the job, because passwd -x 0 should do the job.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vishu
Trusted Contributor

Re: aging parameters does not work

Thanks Steven for your reply. But i want to stop the aging for this user. and passwd -x option is not working as pasted in my first post. It prompts to change password of user through which i logged into the server.

and in SAM, can you please tell me what is the field in SAM, which will work for me.

Thanks
OldSchool
Honored Contributor

Re: aging parameters does not work

"... prompts to change password of user through which I logged into the server."

ok, I missed the part where it's asking you to change *your* password.

you need to be root, su'd to root, or whatever. a non-root user doesn't have the necessary authority
Vishu
Trusted Contributor

Re: aging parameters does not work

@Old school - i tried it with root account. you can see in my fisrt post.

Anyways,Thanks all for their replies. i sorted it out. i just copied the passwd file from other server in /usr/bin and it worked out.

thanks
OldSchool
Honored Contributor

Re: aging parameters does not work

"@Old school - i tried it with root account. you can see in my fisrt post."


"vinay_root # passwd -x 0 sunita
Changing password for vinay
New password:
vinay_root #"


maybe that tells you that you are "root"....but it certainly isn't obvious to the casual observer....i'd have guessed that you *might* have been either "vinjay" or "vinjay_root"......


"i sorted it out. i just copied the passwd file from other server in /usr/bin and it worked out. "

which implies that somebody had replaced the real passwd executable with some kind of wrapper script (maybe)....