|
|
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 u
Length: 1040 (0x410)
Types: TextFile
Notes: @(#)uniq_uid.sh 13.2 (RC International) 91/09/24
Names: »uniq_uid«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/sadm/sysadm/bin/uniq_uid«
# @(#)uniq_uid.sh 13.2 (RC International) 91/09/24 # 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/uniq_uid.sh 1.3" ################################################################################ # Command Name: uniq_uid # # This functions is used for checking 3 things: 1) input was entered # 2) if default is input 3) if user group ID is unique. # # $1 - User input # $2 - Field default (only in usermod) ################################################################################ NOTHING=1 # Nothing entered NOTUNIQ=2 # Not unique OK=0 # login name (ID) is valid # Field is mandatory test -z "$1" && exit $NOTHING # Is field same as default? test "$1" = "$2" && exit $OK # Is uid unique if cat /etc/passwd | cut -f3 -d':' | grep "^$1$" > /dev/null 2>&1 then exit $NOTUNIQ else exit $OK fi