04-02-2020
I'm a bit surprised about your output - how come it containes seven lines "natasha 0" when looping across one single username only? And three lines of those above the header lines? Sure the tmp files are empty when running the script? What be the values of the variables (userexpdate, passexp, exp, expday) during the one loop? Run script with the -x option set, and post output.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
login: TEST7
TEST7's Password:
Your password will expire: Wed Feb 19 14:28:08 2003
How can I the same information become in a script (as example
in the .profile)?????????
My login starts with .profile. These File is a menue with 24 lines and the message " Your password ....." disappear
to... (8 Replies)
Discussion started by: Erwin Stocker
8 Replies
2. UNIX for Advanced & Expert Users
Hi,
How to disable passwd expire in HP UNIX by not using SAM ?
In our system SAM have some strange bugs. However due to some reason, we cannot add that patch.
B. Rgds
Christina (3 Replies)
Discussion started by: christina fung
3 Replies
3. Shell Programming and Scripting
Hi,
Is there any way to find out the UNIX user's password expire date?. It'll we helpful to inform the users to change the password before it get expires.(FYI - I am not having only admin previlege.) (1 Reply)
Discussion started by: sharif
1 Replies
4. Solaris
Hello
I want to set the password for user never expire through the command line. For your information the box is running under Solaris 8 platform. (2 Replies)
Discussion started by: shamsul
2 Replies
5. Red Hat
Hi All,
Is this true on chage command?
-M, MAX_DAYS
Passing the number -1 as MAX_DAYS will remove checking a password's validity.
Does this means password will not expire anymore?
Thanks for any comment you may add. (0 Replies)
Discussion started by: itik
0 Replies
6. Solaris
Hi,
I have a small problem that I need to address regarding the password expiration for a number of different oracle accounts. Currently I have the MAXWEEKS set to 12 in the /etc/default/passwd file for all accounts. I also have sudo installed on the server and users access the oracle accounts... (2 Replies)
Discussion started by: sparcman
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
I am using sftp in batch script for which all configuration for public/private keys are done and it works fine without asking a password. No issues till this point. Now I the problem I have is that if the password expires/someone changes the authentication keys at reote server then the... (4 Replies)
Discussion started by: coolwade
4 Replies
8. AIX
Does anyone know if the default message displayed when a users password has expired can be changed? I am just assuming the message below is the default one. If so please tell.
Using username "justinxx".
justinxx@160.23.12.44's password:
WARNING: Your password has expired.
You must... (2 Replies)
Discussion started by: juredd1
2 Replies
9. Solaris
Hi Lads,
I would like place the mechanism of force reset password to user when he login to the server after his password expired. Currently, We are resetting users once in every 60 days using cron job but I am thinking is there any other way to force reset passwords after it expires? I am using... (1 Reply)
Discussion started by: Navkreddy
1 Replies
10. UNIX for Beginners Questions & Answers
hello everyone,
I am new to linux and got this deliverable to write a script that should check for error in multiple log file (count is approx 2500 log files on single server) and once error is found, it should mail that error
My logic says:
we can put all log files path/location in one... (2 Replies)
Discussion started by: Pratik_CTS
2 Replies
chage(1) General Commands Manual chage(1)
NAME
chage - change user password expiry information
SYNOPSIS
chage [-D binddn] [-P path] [-m mindays]
[-M maxdays] [-d lastday] [-I inactive] [-E expiredate] [-W warndays] user
chage -l [user]
DESCRIPTION
chage is used to list and change the password expiry information of a user. It allows the system administrator to change the number of days
between allowed and required password changes and the date of the last password change. It allows also to define when an account will
expire. The chage command is restricted to the system administrator, except for the -l option, which may be used by an user to determine
when his password or account is due to expire.
If no option is given, chage operates in an interactive mode, prompting the user with the current values for all of the fields. Enter the
new value to change the field, or leave the line blank to use the current value. If the users exists in the local passwd file, but not in
the local shadow file, chage will create a new entry in the shadow file.
OPTIONS
-D, --binddn binddn
Use the Distinguished Name binddn to bind to the LDAP directory. The user will be prompted for a password for simple authentica-
tion.
-P, --path path
The passwd and shadow files are located below the specified directory path. chage will use this files, not /etc/passwd and
/etc/shadow. This is useful for example on NIS master servers, where you do not want to give all users in the NIS database auto-
matic access to your NIS server and the NIS map is build from special files.
-l, --list
This option will list the password expiry information in a human readable format. The user will see the date when he changed the
password the last time, when the password will be expire, when the password will be locked and when the account will expire.
-m, --mindays mindays
With this option the minimum number of days between password changes is changed. A value of zero for this field indicates that the
user may change her password at any time. Else the user will not be permitted to change the password until min days have elapsed.
-M, --maxdays maxdays
With this option the maximum number of days during which a password is valid is changed. When maxdays plus lastday is less than the
current day, the user will be required to change his password before being able to use the account.
-d, --lastday lastday
With this option the date when the password was last changed can be set to another value. lastday has to be specified as number of
days since January 1st, 1970. The date may also be expressed in the format YYYY-MM-DD. If supported by the system, a value of zero
forces the user to change the password at next login.
-E, --expiredate expiredate
With this option the date when the account will be expired can be changed. expiredate has to be specified as number of days since
January 1st, 1970. The date may also be expressed in the format YYYY-MM-DD.
-I, --inactive inactive
This option is used to set the number of days of inactivity after a password has expired before the account is locked. A user whose
account is locked must contact the system administrator before being able to use the account again. A value of -1 disables this
feature.
-W, --warndays warndays
With this option the number of days of warning before a password change is required can be changed. This option is the number of
days prior to the password expiring that a user will be warned the password is about to expire.
FILES
passwd - user account information
shadow - shadow user account information
SEE ALSO
passwd(1), passwd(5)
AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils November 2005 chage(1)