i.passwd revision 92f8349265ba14436101d79aab7def47b373dec2
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# ident "%Z%%M% %I% %E% SMI"
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
export PATH
do
if [ ! -f $dest ] ; then
else
#
# 2.1 version of this file had a trailing blank
# in the nobody entry. Remove it.
#
# 2.6 & earlier versions had an smtp entry; remove it.
#
# The NFS nobody users get better GECOS entries.
sed -e 's/^\(nobody:.*:\) $/\1/' \
-e '/^smtp:/d' \
-e '/^nobody:/s/:Nobody:/:NFS Anonymous Access User:/' \
-e '/^nobody4:/s/:SunOS\ 4\.x\ Nobody:/:SunOS 4.x NFS Anonymous Access User:/;' \
#
# s10 is changing root's group back to 0:
#
sed -e 's/^root:\([^:]*\):0:1:/root:\1:0:0:/' \
#
# Add the 'nobody' user from 4.x so that people don't
# assign it to a regular user and confuse themselves
#
NOBODY4_LINE="nobody4:x:65534:65534:SunOS 4.x NFS Anoymous Access User:/:"
:
else
printf '/^noaccess:x\na\n%s\n.\nw\nq\n' \
fi
#
# Add the 'smmsp' user for sendmail 8.12
#
SMMSP_LIN="smmsp:x:25:25:SendMail Message Submission Program:/:"
:
else
printf '/^nobody4:x\na\n%s\n.\nw\nq\n' \
fi
#
# Add the 'gdm' user if it doesn't exist.
#
GDM_LINE="gdm:x:50:50:GDM Reserved UID:/:"
echo "ERROR: Reserved UID 50 already assigned" \
:
else
printf '/^listen:x\na\n%s\n.\nw\nq\n' \
fi
#
# Add the 'webservd' user if it doesn't exist.
#
WEBSERVD_LIN="webservd:x:80:80:WebServer Reserved UID:/:"
echo "ERROR: Reserved UID 80 already assigned" \
:
else
printf '/^gdm:x\na\n%s\n.\nw\nq\n' \
fi
#
# Add the 'postgres' user if it doesn't exist.
#
POSTGRES_LIN="postgres:x:90:90:PostgreSQL Reserved UID:/:/usr/bin/pfksh"
echo "ERROR: Reserved UID 90 already assigned" \
echo "NOTE: postgres username already assigned" \
:
else
printf '/^webservd:x\na\n%s\n.\nw\nq\n' \
fi
fi
done
exit 0