define TERM setting
comments for development actions added to cbox.sh source local configure scripts examples for local configure scripts added: - set_root_pw - import_authorized_keysmaster
parent
e3f4cb49e3
commit
6fec846638
@ -0,0 +1,25 @@
|
||||
1) Overview
|
||||
the files in this directory are examples 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 local.conf.d/custom-configure.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 (local.conf.d/id_rsa) and copy the public
|
||||
key to the working image directory
|
||||
- IMPORTANT: you have to activate the 'IdentityFile' setting in
|
||||
local.conf.d/ssh-options to enable this feature
|
||||
- this is useful, if you secured the development cryptobox with a
|
||||
password (see 'set_root_pw')
|
@ -0,0 +1,23 @@
|
||||
# import a public rsa key into the cryptobox for ssh authentication
|
||||
#
|
||||
# see README in misc/custom-configure.d for details
|
||||
#
|
||||
# do not forget to activate the 'IdentityFile' setting in
|
||||
# local.conf.d/ssh-options
|
||||
#
|
||||
|
||||
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
|
||||
check_ssh_defaults
|
||||
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"
|
||||
|
@ -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
|
Loading…
Reference in New Issue