i have below commands am using it for removing expire date for my user at unix it's working but for linux it's not working below example is for unix if anyone have a linux command like this i'll be thankful
root@servername>passwd -s user
user PS 05/13/15 84
root@servername>passwd -x -1 user
passwd: password information changed for user
before
username:$md5$Dtj/7tJf$$VY7qJE2us6ODX/2xLUGAS:16568::84::::
after
username:$md5$Dtj/7tJf$$VY7qJE2us6ODX/2xLUGAS:16548::::::
You need the
usermod
command:Where
-1
serves as the argument to-e
.To remove the expire date.
The expiration date parameter can be empty. (but not missing when the
-e
option is used) The-e, --expiredate EXPIRE_DATE
option is described as follows inman 8 usermod
:The issue being on how you interpret
"empty"
. Both forms,-e
or--expiredate=
will accept an empty argument. Those being:or
With thanks to @alx