|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 2524 (0x9dc) Types: TextFile Notes: UNIX file Names: »delvpixuser«
└─⟦0d89e62ea⟧ Bits:30004154/disk1.imd SW95707I VP/ix MS-DOS emulator Rel. 1.1 └─⟦0d89e62ea⟧ UNIX Filesystem └─⟦this⟧ »vp/new/usr/admin/menu/packagemgmt/vpixmgmt/delvpixuser«
#ident# @(#)delvpixuser 1.1 - 88/04/15 #menu# disable users from using the VP/ix Environment #help# #help# This procedure removes the additions to a user's .profile #help# that lets them run VP/ix. It also removes the user's #help# $HOME/vpix directory and all of its contents. You should #help# be sure that the user has not added or changed files under this #help# directory before disabling them as a VP/ix user. trap 'exit 0' 1 2 3 9 15 flags="-qq -k$$" # Make sure that VP/ix has already been installed on the # system. if [ ! -s /usr/options/vp.name ] then /bin/echo "The VP/ix Environment has not been installed on your system." /bin/echo "Please use Sysadm to install the VP/ix Environment." exit 1 fi while true do inst=`checkyn ${flags} -fe -H" This procedure removes files and variables from a user's environment to disable their use of the VP/ix Environment" " Do you wish to disable a VP/ix user's ability to run VP/ix?"` if [ "${inst}" = "n" ] then break fi # Make sure that the user exists echo "\nEnter the User's login ID : \c" read name if grep -i "^$name:" /etc/passwd >/dev/null 2>&1 then : else echo "\nUser $name doesn't exist" continue fi # Get the user's home directory by reading the proper field # from the /etc/passwd file. We assume that his home directory # has a .profile file. This implicitly assumes that the user's # shell is KSH,CSH,SH or RSH. usrhome=`grep "^$name:" /etc/passwd | cut -f6 -d':'` if [ "$?" != "0" -o "$usrhome" = "" ] then echo "\nUnable to find the HOME directory for user $name" echo "Terminating VP/ix de-installation for ${name}.\n" continue fi if [ ! -d $usrhome ] then echo "\nUser's HOME directory doesn't exist: '$usrhome'" echo "Terminating VP/ix de-installation for ${name}.\n" continue fi # Remove user's $HOME/vpix directory and its contents. if [ -d $usrhome/vpix ] then inst=`checkyn ${flags} -fe -H" ${name} may have installed private files under his $usrhome/vpix directory, or tailored his VP/ix environment by customizing his $usrhome/vpix/C: file. All this information will be permanently destroyed by the de-installation process." " ${name}'s $usrhome/vpix directory will now be removed. Proceed?"` [ "$inst" = "n" ] && continue rm -rf $usrhome/vpix fi # Remove all mention of VPIXCNF and DOSPATH from user's .profile. egrep -v "VPIXCNF|DOSPATH" $usrhome/.profile >/tmp/$$ 2>/dev/null cp /tmp/$$ $usrhome/.profile rm /tmp/$$ echo "\nUser $name can no longer use the VP/ix Environment\n" done exit 0