#!/bin/sh
# 
# If you are having trouble adding passwords to /etc/shadow due to
# adduser-1.2, you can run this script to fix it. The old shadow file is
# kept in /etc/shadow.save.
# 
# For more information, see the Red Hat Linux 4.1 General Errata:
#   http://www.redhat.com/errata
# 
cd /etc
cp shadow shadow.new
cp shadow shadow.save
awk -F: 'NF == 10 { gsub("-1", "") ; sub(":$", "") }
         { print }' < shadow > shadow.new
mv shadow.new shadow
# 
# -------- End --------
