Can't extract expiry days from shadow
Afraid I are having problems trying to extract the number of days to a users password expiry date to use in another application.
I can find no utility on RH like prwarn under SCO.
I have tried with a test script which works fine under root but as the user I have permission problems.
Ush52 $ ll /etc/shadow
-r-------- 1 root root 1289 Dec 12 08:47 /etc/shadow
Ush52 $ ll expiry
-rwsr-xr-x 1 root root 80 Dec 12 07:30 expiry
Ush52 $ cat expiry
EXPDAYS=`cat /etc/shadow | grep $USER`
Ush52 $ expiry
cat: /etc/shadow: Permission denied
Appreciate any assistance