|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ T c
Length: 1080 (0x438)
Types: TextFile
Notes: @(#)chk_logins.sh 13.1 (RC International) 91/07/25
Names: »chk_logins«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/sadm/sysadm/bin/chk_logins«
# @(#)chk_logins.sh 13.1 (RC International) 91/07/25
# Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
# All Rights Reserved
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#!/sbin/sh
#ident "@(#)oamintf:usermgmt/chk_logins.sh 1.3"
################################################################################
# Commad Name: chk_logins
#
# This script is used for validating that exist. Used in
# Form.addgrp and Form.modgrp2
################################################################################
test -z "$1" && exit 0 # Optional field, can be blank
sed -e 's/^\([^:]*\):[^:]*:\([^:]*\).*/\1,\2/p' \
-e '/,[0-9]\{1,2\}$/d' /etc/passwd > /tmp/$$.logins
# verify that groups entered are valid
for x in `echo $1 | sed 's/,/ /g'`
do
if grep "^$x," /tmp/$$.logins > /dev/null ||
grep ",$x$" /tmp/$$.logins > /dev/null
then
continue
else
rm -f /tmp/$$.logins
echo $x > /tmp/ln
exit 1
fi
done
rm -f /tmp/$$.logins
exit 0