5 echo 'sysname= env var is not set'
8 echo 'checking this host''s tuple:'
9 ip=`{ndb/query sys $sysname ip}
13 echo ' ip='$ip 'looks ok'
14 dom=`{ndb/query sys $sysname dom}
17 if not if(! ~ $dom *.*)
18 echo ' dom='$dom 'does not have a dot'
19 if not if(! ~ $dom $sysname^.*)
20 echo ' dom='$dom 'does not start with' $sysname^'; it''s supposed to be the FQDN, not the domain name!'
22 echo ' dom='$dom 'looks ok'
23 ether=`{ndb/query sys $sysname ether}
25 echo ' no ether entry'
26 if not if(! ~ $ether [0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])
27 echo ' ether='$ether 'has wrong format'
28 if not if(! grep -s $ether /net/ether*/addr)
29 echo ' ether='$ether 'does not belong to any network interface'
31 echo ' ether='$ether 'looks ok'
34 echo 'checking the network tuple:'
35 ipnet=`{ndb/ipquery sys $sysname ipnet | sed 's/^ipnet=//'}
37 echo ' we are not in an ipnet, so looking for entries in host tuple only'
40 echo ' we are in ipnet='^$ipnet
41 ipgw=`{ndb/ipquery sys $sysname ipgw | sed 's/^ipgw=//'}
43 echo ' we do not have an internet gateway, no ipgw= entry'
46 if(! ~ $ipgw *.*.*.* *:*:*:*:*:*:*:* *::*)
47 echo ' ipgw='$ipgw 'does not look like an ip address'
49 echo ' ipgw='$ipgw 'looks ok'
51 dns=`{ndb/ipquery sys $sysname dns | sed 's/^dns=//'}
54 if not if(! ip/ping -n 1 $dns >/dev/null >[2=1])
55 echo ' dns='$dns 'does not reply to ping'
57 echo ' dns='$dns 'looks ok'
58 auth=`{ndb/ipquery sys $sysname auth | sed 's/^auth=//'}
60 echo ' no auth= entry'
61 if not if(! ip/ping -n 1 $auth >/dev/null >[2=1])
62 echo ' auth='$auth 'does not reply to ping'
65 echo ' auth='$auth 'looks ok'
69 echo 'checking auth server configuration:'
71 echo ' no auth server'
74 if not if(~ $auth $sysname){
75 echo ' we are the auth server'
78 if not if(~ $auth $dom){
79 echo ' we are the auth server'
82 if not if(~ $auth $ip){
83 echo ' we are the auth server'
87 echo ' we are not the auth server '^$auth
88 echo ' if this is a mistake, set auth='$sysname' or auth='$dom
90 echo ' run auth/debug to test the auth server'
93 if(! grep -s keyfs <{ps})
94 echo ' auth/keyfs is not running, try reboot'
96 echo ' auth/keyfs is running'
97 if(! grep -s 'Listen *567' <{netstat -n})
98 echo ' no one listening on port 567, try reboot'
100 echo ' someone is listening on port 567'
101 echo ' run auth/debug to test the auth server'
107 echo 'checking basic security:'
108 if(@{rfork n; mount -n /srv/boot /root >/dev/null >[2=1]})
109 echo ' file server does not require auth for user '^`{cat '#c'/user}
111 echo ' file server seems to require auth'