2 # Do not change the order of this array
3 RSBAC_KERNELS=(kernel26rsbac-daz kernel26rsbac)
6 for kern in ${RSBAC_KERNELS[@]}; do
7 [ -n "$(pacman -Q $kern 2> /dev/null)" ] && RSBAC_VERSION=$kern
10 # libtool --finish /usr/lib &> /dev/null
11 groupadd -g 400 secoff &> /dev/null
12 useradd -m -d /secoff -g 400 secoff &> /dev/null
13 mkdir -p /secoff/.rsbac
14 mv -f /etc/functions.rsbac /secoff/.rsbac/functions
15 mv -f /etc/config.rsbac /secoff/config
17 chown -R secoff:secoff /secoff
19 if [ -z "$RSBAC_VERSION" ]; then
20 echo -e "\n CONFIGURATION:"
21 echo " - Set a secure password for the security officer:"
22 echo " # passwd secoff"
23 echo -e "\n You should install an RSBAC kernel alongside this package."
25 echo -e "\n ------------------------------------------------------------"
27 echo " Read the following steps CAREFULLY and follow them EXACTLY."
28 echo " A reboot is involved, so write down the steps if necessary."
29 echo " ------------------------------------------------------------"
30 echo -e "\n CONFIGURATION:"
31 echo " 1. Set a secure password for the security officer:"
32 echo " # passwd secoff"
33 echo " 2. Add this paramater to the RSBAC kernel's GRUB/LILO entry:"
34 echo " rsbac_softmode"
35 echo " 3. Reboot to the Softmode RSBAC kernel."
36 echo " 4. Login as the secoff user."
37 echo " 5. Run the configuration script:"
38 echo -n " $ ./config "
39 [ "$RSBAC_VERSION" == "kernel26rsbac-daz" ] && echo "daz" || echo "rsbac"
40 echo " 6. Remove the 'rsbac_softmode' kernel parameter."
41 echo -ne "\n You should now have "
42 [ "$RSBAC_VERSION" == "kernel26rsbac-daz" ] && \
43 echo -n "a Dazuko interface " || echo -n "an RSBAC framework "
44 echo "upon rebooting."
46 echo -e " This package will ONLY work with RSBAC $ADMIN_VERSION kernels.\n"
54 userdel -r secoff &> /dev/null
55 groupdel secoff &> /dev/null