#!/bin/sh
#
# /usr/bin/passwd (0755): wrapper to make non-system users to use yppasswd(1)
#
# NB! You *must* save the real passwd command as /usr/bin/passwd.real
#

if [ `/usr/bin/id -ru` -lt 500 ]
then
  exec /usr/bin/passwd.real "$@"
else
  exec /usr/bin/yppasswd "$@"
fi
