LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-04-2013, 03:22 AM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 284

Rep: Reputation: 17
Question command to findout password expiry date


Hi,

I would like to know is there command which will tell me when password will be expire and when last password was changed ?

like on linux chage -l <username?
 
Old 02-04-2013, 04:13 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
It can be checked in /etc/shadow file in it's 8th field.
Code:
~$ grep 'username' /etc/shadow
OR
~$ awk -F":" '/username/ {print $8}' /etc/shadow
It contains the date when the user account expires once exceeded.

As per manual of shadow:
Quote:
expire

An absolute date expressed as the number of
days since the Unix Epoch (January 1, 1970).
When this number is reached the login can no
longer be used. For example, an expire value
of 13514 specified a login expiration of
January 1, 2007.
Also once go through manuals for more clear understanding:
Code:
~$ man passwd
~$ man shadow

Last edited by shivaa; 02-04-2013 at 04:17 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Password doesn't expire after expiry date sudh Linux - Software 3 01-04-2012 03:17 PM
how to check the password expiry date of a user? binary_0011 Other *NIX 1 06-04-2008 01:37 AM
Terminal Command to find out expiry date on user accounts Caighil Linux - Newbie 3 02-29-2008 04:47 PM
Can I retrieve certificate expiry date from an openssl certificate (command line) davee Linux - Security 1 07-21-2006 10:28 AM
Getting password expiry for all accounts in a single command jdc2048 Linux - Security 2 05-26-2004 08:14 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration