I need to reset the root password to expire in 182 days, I just want to make a backup of the shadow file and do a replace, I would think what I'm trying would work but I have something here wrong.
perl -i.bak.20080404 -e 's/^(root:.+):91:28/$1:182
:28/' /etc/shadow
I tried escaping the colons but that did not help and I did not think that would be necessary here.
Thanks,
Start Free Trial