#!/bin/sh
#
# Author: Peter Keel <killer@discordia.ch>
# Take out passwords out of "/etc/passwd" and replace with 'x'. Typically
# used for switching to shadow-passwords.
#
cat /dev/null > passwd.new
cat passwd | awk -F: '
                {
                printf("%s:x:%s:%s:%s:%s:%s\n", $1,  $3, $4, $5, $6, $7)
                }
               ' >> passwd.new
mv passwd passwd.old
mv passwd.new passwd
