further development
This commit is contained in:
parent
0b8449c48d
commit
a6c10f516b
316 changed files with 18735 additions and 0 deletions
35
new/configure-examples.d/README
Normal file
35
new/configure-examples.d/README
Normal file
|
@ -0,0 +1,35 @@
|
|||
1) Overview
|
||||
the files in this directory are examples for specific hook scripts to change the
|
||||
configuration of the box
|
||||
|
||||
2) How to use these scripts
|
||||
Copy the scripts, you would like to use into 'configure-local.d'.
|
||||
They will be sourced in alphabetic order AFTER the default configuration of the
|
||||
cryptobox.
|
||||
|
||||
3) The examples
|
||||
|
||||
set_root_pw
|
||||
- replace the empty root password (the default) with a choosen password
|
||||
- useful if your development cryptobox:
|
||||
- is located in an insecure environment
|
||||
- or your development team is geographically distributed, so the
|
||||
cryptobox for testing has to be publicly available
|
||||
|
||||
import_authorized_keys
|
||||
- create a new rsa key (etc-local.d/id_rsa) and copy the public
|
||||
key to the image directory
|
||||
- this is useful, if you secured the development cryptobox with a
|
||||
password (see 'set_root_pw')
|
||||
|
||||
set_default_???
|
||||
- change the default setting for:
|
||||
- IP
|
||||
- language
|
||||
- or idle timeout
|
||||
|
||||
set_hostname
|
||||
- change the default hostname ("cryptobox")
|
||||
|
||||
set_scan_devices
|
||||
- change the default selection of devices, that can be used as the crypto harddisk
|
19
new/configure-examples.d/import_authorized_keys
Normal file
19
new/configure-examples.d/import_authorized_keys
Normal file
|
@ -0,0 +1,19 @@
|
|||
# import a public rsa key into the cryptobox for ssh authentication
|
||||
#
|
||||
# see README in configure-examples.d for details
|
||||
#
|
||||
|
||||
SSH_KEY_FILE="$LOCALCONF_DIR/id_rsa"
|
||||
|
||||
# create a rsa key if it does not yet exist
|
||||
if [ ! -e "$SSH_KEY_FILE" ]
|
||||
then echo "Creating ssh key ($SSH_KEY_FILE) ..."
|
||||
mkdir -p $(dirname "$SSH_KEY_FILE")
|
||||
ssh-keygen -t rsa -b 1024 -N '' -q -f "$SSH_KEY_FILE"
|
||||
fi
|
||||
|
||||
# copy new public ssh key to ~/.ssh/authorized_keys on cryptobox
|
||||
echo "Copying local public ssh key file to the box ..."
|
||||
mkdir -p "$IMAGE_DIR/opt/dfsbuild/runtimerd/root/.ssh"
|
||||
cp "${SSH_KEY_FILE}.pub" "$IMAGE_DIR/opt/dfsbuild/runtimerd/root/.ssh/authorized_keys"
|
||||
|
3
new/configure-examples.d/set_default_ip
Normal file
3
new/configure-examples.d/set_default_ip
Normal file
|
@ -0,0 +1,3 @@
|
|||
# set the default IP of the cryptobox
|
||||
|
||||
echo -n "192.168.0.23" >"$IMAGE_DIR"/usr/share/cryptobox/defaults/ip
|
3
new/configure-examples.d/set_default_language
Normal file
3
new/configure-examples.d/set_default_language
Normal file
|
@ -0,0 +1,3 @@
|
|||
# set the default language of the cryptobox
|
||||
|
||||
echo -n "en" >"$IMAGE_DIR"/usr/share/cryptobox/defaults/language
|
5
new/configure-examples.d/set_default_timeout
Normal file
5
new/configure-examples.d/set_default_timeout
Normal file
|
@ -0,0 +1,5 @@
|
|||
# set the default idle timeout of the cryptobox
|
||||
|
||||
# idle time in minutes (before turning off the crypto filesystem automatically)
|
||||
# "0" -> no automatic deactivation
|
||||
echo -n "15" >"$IMAGE_DIR"/usr/share/cryptobox/defaults/timeout
|
3
new/configure-examples.d/set_hostname
Normal file
3
new/configure-examples.d/set_hostname
Normal file
|
@ -0,0 +1,3 @@
|
|||
# change the hostname (default value: "cryptobox")
|
||||
|
||||
echo "cryptobox" >"$IMAGE_DIR"/etc/hostname
|
10
new/configure-examples.d/set_root_pw
Normal file
10
new/configure-examples.d/set_root_pw
Normal file
|
@ -0,0 +1,10 @@
|
|||
# replace the empty root password of an development cryptobox with a choosen one
|
||||
#
|
||||
# see misc/custom-configure.d/README for details
|
||||
#
|
||||
|
||||
# set the password to your needs
|
||||
NEW_ROOT_PASSWORD=foobar
|
||||
|
||||
echo "Setting a root password ..."
|
||||
echo "root:$NEW_ROOT_PASSWORD" | chroot "$IMAGE_DIR" "$CHROOTSTART" chpasswd root
|
3
new/configure-examples.d/set_scan_devices
Normal file
3
new/configure-examples.d/set_scan_devices
Normal file
|
@ -0,0 +1,3 @@
|
|||
# change the selection of devices, that can be used as the crypto harddisk
|
||||
|
||||
sed -i '#s#^SCAN_DEVICES=.*$#SCAN_DEVICES="/dev/hda /dev/hdb /dev/hdc /dev/hde /dev/hdf /dev/hdg /dev/scd0 /dev/scd1 /dev/scd2 /dev/scd3"#' "$IMAGE_DIR"/etc/cryptobox/cryptobox.conf
|
Loading…
Add table
Add a link
Reference in a new issue