DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T d

⟦ee66fedf9⟧ TextFile

    Length: 2665 (0xa69)
    Types: TextFile
    Names: »dishinit«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/others/quipu/uips/dish/dishinit« 

TextFile

#!/bin/sh 
#
# dishinit uses the shell version of dish - which must be installed,
# to read a users entry from the DSA, and creates a default ~/.quipurc 
# for them.
#
# To use dishinit you must set the following 3 parameters:-
#
# MANAGER - The name of the Manager of the local DSA.
manager="c=GB@o=UCL@ou=CS@cn=wombat"
#
# PASSWORD - The password of the managers entry.  
# This file should be protected using UNIX file permission to prevent
# this password being revealed.
password=foobar
#
# LOCAL - The DN of the local subtree, below which users will be found.
local=@c=GB@o=ucl@ou=cs
#
# Now the script....
#
if [ -z "$USER" ]
then
	echo Don''t know who you are !!!
	exit 1
fi
if [ -z "$HOME" ]
then
	echo Don''t know your home directory !!!
	exit 2
fi
quipurc=$HOME/.quipurc
if ( bind -user $manager -password $password > /dev/null 2> /dev/null )
then
	echo Connected to the Directory...
else
	echo ERROR: Could not contact the Directory.
	exit 3
fi
if ( search $local -filter userid=$USER >/dev/null 2> /dev/null)
then
	echo Found your entry - creating ~/.quipurc...
	moveto 1
	echo -n username: >> $quipurc
	showname -compact >> $quipurc
	echo -n me: >> $quipurc
	showname -compact >> $quipurc
	echo -n password: >> $quipurc
	if ( showentry -type userPassword -nokey >> $quipurc 2> /dev/null )
	then
		echo "" >> $quipurc
	else
		echo You need a password...
		stty -echo
		while test $PASS != $PASS2
		do
			echo -n "Enter password: "
			read PASS dummy
			echo ""
			echo -n "Re-enter password: "
			read PASS2 dummy
			if [ $PASS != $PASS2 ]
			then
				echo ""
				echo Mismatch - try again...
			fi
		done
		stty echo
		echo $PASS >> $quipurc
		echo UserPassword = $PASS > /tmp/dish-$USER
		echo acl = self \# write \# attributes \# acl \$ userPassword >> /tmp/dish-$USER
		echo acl = others \# compare \# attributes \# acl \$ userPassword >> /tmp/dish-$USER
		echo ""
		echo Altering password for \"$USER\"...
		if ( modify -draft /tmp/dish-$USER -noedit >/dev/null 2>/dev/null )
		then
			echo Done.
		else
			echo The modification failed.
			echo Contact \"$manager\" who will be able to help you.
		fi
		rm -f /tmp/dish-$USER
	fi
else
	echo ERROR: Could not find an entry for user \"$USER\" in the Directory.
	echo Contact \"$manager\" who should be able to help.
	echo In the mean time you will be able to read from the
	echo Directory - but NOT write to it.
fi
echo position: $local >> $quipurc
echo noshow: acl >> $quipurc
echo noshow: treestructure >> $quipurc
echo noshow: masterdsa>> $quipurc
echo noshow: slavedsa>> $quipurc
echo noshow: objectclass >> $quipurc
echo cache_time: 30 >> $quipurc
echo connect_time: 2 >> $quipurc
unbind
exit 0