Where and how exactly I can set the expiration time of password of users i.e.the time after which the UNIX OS prompts user after giving some warnings that your password will expire with in n days and then expire the user's password?

It is not part of the Unix standard, and is completely different depending on what OS you are using, and if you are using some sort of directory service. If you want to know you need to specify what OS you are using, and if it is Linux you probably need to specify what distro.

Louis, I am using linux,and I need to configure such setting that the passwords for all users will expire after a definite time.
–
Sachin ChourasiyaNov 5 '09 at 10:23

@Sachin, Louis asked that you state what distro you're using. From what I understand this feature is not a standard on UNIX/Linux systems but may be available on some Linux distro. So let us know which one you're using.
–
HelenNov 5 '09 at 10:49

@Helen, I knew this is not a part of standard , but this is some what I need to conmfigure so as to achieve the automatic password expiration facility and thus to ensure the security.
–
Sachin ChourasiyaNov 5 '09 at 11:13

chage -l john
Last password change : May 22, 2007
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7