]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/inst/authsetup
ccddc00ec048d674488434a90e07cf2066e2d207
[plan9front.git] / rc / bin / inst / authsetup
1 #!/bin/rc
2
3 # desc: invalidate nvram
4 # prereq: systype copydist
5
6 nvram=(/dev/sd*/nvram)
7 nvram=$nvram(1)
8
9 switch($1){
10 case go
11         echo 'trust, but verify' >$nvram
12
13         echo
14         echo 'You will be asked to enter an authid, authdom, secstore key,'
15         echo 'and password upon next boot. The authid is the hostowner.'
16         echo 'The authdom is the domain from your network configuration.'
17         echo 'The secstore key and password should be a secret password'
18         echo 'of eight characters or greater in length. On an auth server,'
19         echo 'the password will be used to encrypt the user database'
20         echo '/adm/keys'
21         echo
22
23         authsetup=done
24         export authsetup
25 case checkdone
26         if(~ $syst cpu && test -w $nvram && ! grep -s trust $nvram){
27                 authsetup=ready
28                 export authsetup
29         }
30 }