DataMuseum.dk

Presents historical artifacts from the history of:

ICL Comet 32

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

See our Wiki for more about ICL Comet 32

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦14160fe94⟧ TextFile

    Length: 1149 (0x47d)
    Types: TextFile
    Notes: UNIX file
    Names: »pwords«

Derivation

└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
    └─⟦28c352965⟧ »/a« UNIX Filesystem
        └─⟦this⟧ »sys/build/pwords« 

TextFile

#! /bin/csh -f

cp $subs/passwd /tmp/passwd
echo ""
echo "Here's the initial /etc/passwd file:"
wrfile wrpasswd /tmp/passwd /etc/passwd
if ($status) exit(1)

if (! -f /etc/passwd) then
	echo "No file /etc/passwd - cannot continue"
	exit(0)
endif

while (1)
	switch (`ask rootpass "Choose a password for root?"`)
	case y:
	case yes:
		echo ""
		echo "Executing: passwd"
		passwd
		echo ""
		grep '^root::' /etc/passwd > /dev/null
		if ($status == 0) then
			echo "You didn't do it after all..."
			continue
		endif
		echo "The password field was encrypted:"
		echo ""
		sed -e '2,$d' /etc/passwd
		break
	case quit:
		exit(1)
	endsw
	break
end

set frob = some
while (1)
	switch (`ask nutest "Try adding $frob users?"`)
	case y:
	case yes:
		echo ""
		echo "Executing: nu -a"
		echo ""
		nu -a
		if ($status) then
			echo ""
			echo "Nu returns with error status"
		endif
		set frob = more
		continue
	case p:
	case print:
		echo ""
		cat /etc/passwd
		continue
	case quit:
		exit(1)
	endsw
	break
end

echo ""
echo "Nu can also be used to modify and delete user accounts.  Please"
echo "read the manual entry for nu before trying to do so."
sleep 5