root@node033:~# vi exppass
root@node033:~# bash exppass
exppass: line 7: syntax error: unexpected end of file
root@node033:~# cat exppass
cat /etc/shadow |
while IFS=":" read col1 col2 col3 col4 col5 col6 col8;
do
echo $col3 $col8
if [ $expire -lt $today ];
then
I am trying to remove the expiration passwd using to compare the date and time. adjust your script to do something along the lines:
if [ $expire -lt $today ]; then
#delete the password
I think $expire
above is equivalent to one of the columns you're reading. and you can get today's date by doing something like today=$(date +%s)