Plan 9 from Bell Labs’s /usr/web/sources/contrib/mycroftiv/unreleased/confighelper/authassistant

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

echo 'view auth explanation first? (y for yes)'
TUT=`{read}
if (~ $TUT 'y'){
	cat /usr/bootes/lib/authguide |fmt
}

echo 'new sysname?'
NEWSYSNAME=`{read}
echo 'system ip?'
NEWSYSIP=`{read}
echo 'new authdom?'
NEWAUTHDOM=`{read}
echo 'new auth server? (often the same as system name for standalone systems)'
NEWAUTH=`{read}

touch /tmp/configfiles/newsysscript
echo 5 >/tmp/configfiles/newsysscript
echo $sysname >>/tmp/configfiles/newsysscript
echo $NEWSYSNAME >>/tmp/configfiles/newsysscript
echo 4 >>/tmp/configfiles/newsysscript
echo 4 >>/tmp/configfiles/newsysscript
echo $NEWSYSIP >>/tmp/configfiles/newsysscript
echo $NEWSYSNAME >>/tmp/configfiles/newsysscript
echo $NEWAUTHDOM >>/tmp/configfiles/newsysscript
echo $NEWAUTH >>/tmp/configfiles/newsysscript
echo s >>/tmp/configfiles/newsysscript
echo q >>/tmp/configfiles/newsysscript
echo 1 >>/tmp/configfiles/newsysscript
echo 1 >>/tmp/configfiles/newsysscript
echo 1 >>/tmp/configfiles/newsysscript
echo $NEWSYSNAME >>/tmp/configfiles/newsysscript
echo s >>/tmp/configfiles/newsysscript
echo q >>/tmp/configfiles/newsysscript
echo q >>/tmp/configfiles/newsysscript

confighelper </tmp/configfiles/newsysscript >[2=1] >/dev/null

echo 'nuking nvram...'
echo nukingthenvram >/dev/sdC0/nvram
echo 'ok reboot, set the new machine key, reset the passwords with auth/changeuser, and if neither you nor the author of this script messed up, you will be ready to auth.'
echo ''
rm /tmp/configfiles/newsysscript
exit

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.