/usr/lib/yp/ypxfr_1perhour is in nis 3.17-33.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #! /bin/sh
#
# ypxfr_1perhour Transfer the group and password files
# every hour in case we missed an update.
# (Or if we don't get automatic updates).
#
# Version: @(#)ypxfr_1perhour.sh 1.01 MvS
#
if [ -f /etc/default/nis ]; then
. /etc/default/nis
fi
YPBINDIR=/usr/lib/yp
if [ "${NISSERVER}" != "slave" ]; then
exit 0
fi
if [ "${NISMASTER}" = "" ]; then
NISMASTER=$(/usr/bin/ypwhich -m 2>/dev/null | awk '{print $2}' | head -1)
fi
ALL_MAPS=$(${YPBINDIR}/yphelper --maps ${NISMASTER})
MAPS="passwd.byname passwd.byuid shadow.byname group.byname group.bygid"
for map in $MAPS
do
if echo $ALL_MAPS | grep $map > /dev/null ; then
[ -t 1 ] && echo "$YPBINDIR/ypxfr $map"
$YPBINDIR/ypxfr $map
fi
done
|