• Home
  • Disclaimer
  • Contact
  • Archives
  • About
  • Subscribe
  • Support
  • Advertise

Kernel Talks

Unix, Linux, & Cloud!

  • How-to guides
    • Howto
    • Disk management
    • Configurations
    • Troubleshooting
  • OS
    • HPUX
    • Linux
  • Miscellaneous
    • Software & Tools
    • Cloud Services
    • System services
    • Virtualization
  • Certification Preparations
    • AWS Certified Solutions Architect – Associate
    • AWS Certified Solutions Architect – Professional
    • AWS Certified SysOps Administrator – Associate
    • AWS Certified Cloud Practitioner
    • Certified Kubernetes Administrator
    • Hashicorp Certified Terraform Associate
    • Oracle Cloud Infrastructure Foundations 2020 – Associate
  • Tips & Tricks
  • Linux commands
You are here: Home / HPUX

How to remove password expiry in HPUX HP Unix

Published: March 16, 2016 | Modified: June 20, 2020



Know how to remove password expiry in HPUX trusted system. This is helpful in setting app accounts that need non-expiry passwords to run.


Requirement

Every account on the system has a password expiry period defined. Password expiry period means after that period (defined in days) account owner should change the account’s password. Some applications/users are required to have the same password for a longer duration. This requires them to exit from the system-wide password expiry policy. So that those accounts can run a lifetime without the need for changing their passwords.

Also read: How to remove password expiry in Linux

How to do it

Firstly check current set values for the account using getprpw.

# /usr/lbin/getprpw username
uid=114, bootpw=NO, audid=67, audflg=1, mintm=90, maxpwln=-1, exptm=90, lftm=90,, syspnpw=DFT, rstrpw=DFT, nullpw=DFT, admnum=-1, syschpw=DFT, sysltpw=DFT, timeulogin=-1, uloginy=-1, umaxlntr=-1, alock=NO, lockout=0000000

We are modifying the below parameters for an account in order to achieve our goal.

  1. exptm: Password expiration time
  2. expwarn : Password expiration warning time
  3. lftm : Password lifetime
  4. mintm : Time between password changes

All the above parameters are always defined in days. Setting them to -1 disables that password aging rule for a specified account. All the above parameters can be individually tweaked like below.

/usr/lbin/modprpw -l -m exptm=-1 username
/usr/lbin/modprpw -l -m expwarn=-1 username
/usr/lbin/modprpw -l -m lftm=-1 username
/usr/lbin/modprpw -l -m mintm=-1 username

They even can be tweaked in a single command like on below :

/usr/lbin/modprpw -l -m mintm=-1,exptm=-1,expwarn=-1,lftm=-1 username

Here -l switch makes changes to the local account only. It is advised to use -l switch with all the above options per the man page of modprpw.

Now see values newly set in the account. You can notice values are tweaked to -1 now.

# /usr/lbin/getprpw username
uid=114, bootpw=NO, audid=67, audflg=1, mintm=-1, maxpwln=-1, exptm=-1, lftm=-1,T, syspnpw=DFT, rstrpw=DFT, nullpw=DFT, admnum=-1, syschpw=DFT, sysltpw=DFT, timculogin=-1, uloginy=-1, umaxlntr=-1, alock=NO, lockout=0000000
⇠ Previous article
Highest size files in mount point
Next article ⇢
How to restore nagios configuration from backup

Related stuff:

  • How to execute command inside Docker container
  • Run levels in HPUX at a glance
  • Create nice text banner in HPUX
  • How to check bad wrong login attempts in HPUX
  • How to rename volume group
  • Adding new storage LUN to integrity virtual machine (iVM) in HPUX
  • How to add Cloundfront CDN in WordPress blog with SSL
  • Auto port aggregation APA configuration in HPUX
  • cut command and its examples
  • sar command (Part III) : Disk, Network reporting
  • How to forward SSH key in Putty
  • How to configure proxy for YUM in RHEL, CentOS ?

Filed Under: Howto, HPUX Tagged With: account management, Fields in getprpw command, modprpw command in HP-UX, Password expiry in HP-UX, Remove password expiry, Use of modprpw command

If you like my tutorials and if they helped you in any way, then

  • Consider buying me a cup of coffee via paypal!
  • Subscribe to our newsletter here!
  • Like KernelTalks Facebook page.
  • Follow us on Twitter.
  • Add our RSS feed to your feed reader.

Share Your Comments & Feedback: Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get fresh content from KernelTalks

  • Email
  • Facebook
  • RSS
  • Twitter

Get Linux & Unix stuff right into your mailbox. Subscribe now!

* indicates required

This work is licensed under a CC-BY-NC license · Privacy Policy
© Copyright 2016-2023 KernelTalks · All Rights Reserved.
The content is copyrighted to Shrikant Lavhate & can not be reproduced either online or offline without prior permission.