summaryrefslogtreecommitdiffstats
path: root/collab/webmin/INSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'collab/webmin/INSTALL')
-rwxr-xr-xcollab/webmin/INSTALL44
1 files changed, 44 insertions, 0 deletions
diff --git a/collab/webmin/INSTALL b/collab/webmin/INSTALL
new file mode 100755
index 0000000000..24cb26f442
--- /dev/null
+++ b/collab/webmin/INSTALL
@@ -0,0 +1,44 @@
+# Attempt is made here to lock in Webmin configuration,
+#
+# making it more predictable and secure.
+# Port and password are generated using week random
+# generators, but that may still be better than human.
+# These values will be preserved in the compile log,
+# making it possible to recover.
+#
+
+readonly ALPHABET="1234567890abcdefghijklmnopqrstuvxyz" &&
+
+config_dir="/etc/webmin" &&
+var_dir="/var/log/webmin" &&
+perl="`which perl`" &&
+host="`hostname`" &&
+#
+# generate port number between 2048 and (16384 - 1)
+#
+port=$((RANDOM % (16384 - 2048) + 2048)) &&
+os_type="debian-linux" &&
+os_version="3.0" &&
+real_os_type="Source Mage GNU/Linux" &&
+real_os_version="1.0" &&
+atboot=1 &&
+ssl=0 &&
+spell_ok Net-SSLeay && ssl=1 ||
+login="admin" &&
+password="" &&
+for (( C = 0; C < 8; ++C )) do
+password="${password}${ALPHABET:RANDOM % 36:1}"
+done &&
+export config_dir var_dir perl host port \
+os_type os_version real_os_type real_os_version \
+atboot ssl login password &&
+
+echo "Default password: $password" &&
+echo "Default port: $port" &&
+
+mkdir -p /usr/share/webmin &&
+cp -dfR . /usr/share/webmin &&
+cd /usr/share/webmin &&
+
+./setup.sh
+#rm /etc/init.d/webmin