Re: Is there a unix command to display unix user account expiry, inactive expiry
From: Richard L. Hamilton (Richard.L.Hamilton_at_mindwarp.smart.net)
Date: Thu, 10 Jun 2004 15:20:58 -0000
In article <email@example.com>,
firstname.lastname@example.org (Jitendra Sharma) writes:
> Dear Unix Gurus,
> 1. Is there a Solaris command to display configured unix user account
> expiry days i.e let's say I execute
> %unix usermod -e 06/11/2004 jk1
> How can I see this date using a unix command ? and similarly for
> inactive expiry days. I tried using passwd -s jk1 but that displays
> only Passoword information only.
> 2. Is there a Solaris API to convert expiry date in /etc/shadow to
> mm/dd/yy format and vice-versa ?ie.
> jk1:2j92MGiE0iljY:12577:7:30:7::12580: <--How can I convert 12580 to
> Any help/pointers will be highly appreciated.
Are you also running NIS? Password expiration isn't (well, give or take)
supported on NIS. You could explicitly display the info in the files
with passwd -r files -s jk1, but that's only meaningful if the system
in question has files before nis for passwd in nsswitch.conf, or if jk1
is only present in files and not in nis (i.e. if this isn't the NIS
master set up to build the passwd maps from /etc/passwd and /etc/shadow).
-- mailto:email@example.com http://www.smart.net/~rlhamil