I am trying to write a script that ouputs the username,real name, and account expriation date. This is the code I have so far.
awk -F: '$3 > 1000 { print $1, $5 }|grep /etc/shadow (print $9)to_date('1970-01-01','YYYY-MM-DD') + numtodsinterval(1244108886,'SECOND')
input:
smithj:Ep6mckrOLChF.:10063:0:99999:7:::
westf:Ep7uopliokmmm.:1058:0:1087654:7:::
martinezj:GHolimpjk90.:1010:0:1008759:7::
output:
John Smith Password expires never
Frank West Password expires: May 8th 2015
Jose Martinez Password expires: August 12th 2015