diskimage-builder/elements/devuser
Colleen Murphy a6e6570102 Fix devuser pubkey defaults
Without this patch, the devuser element attempts to find public keys by
iterating over the string "rsa dsa". When two keys are grouped together
in quotes, a bash for loop treats it as a single key. You can see the
issue this causes when debug output is turned on:

   + for fmt in '"rsa dsa"'
   + '[' -f '/home/krinkle/.ssh/id_rsa dsa.pub' ']'

This is not a reasonably named key to look for, so this patch removes
the quotes so that the loop will look for id_rsa.pub and id_dsa.pub
separately.

Change-Id: I0b5b1abd14013de85d90e76a95918a8071a5e013
2015-10-13 17:54:09 -07:00
..
environment.d Add generic devuser element 2015-04-08 07:01:24 +00:00
extra-data.d Fix devuser pubkey defaults 2015-10-13 17:54:09 -07:00
install.d Add generic devuser element 2015-04-08 07:01:24 +00:00
README.rst Add generic devuser element 2015-04-08 07:01:24 +00:00

=======
devuser
=======

Creates a user that is useful for development / debugging. The following
environment variables can be useful for configuration:

Environment Variables
---------------------

DIB_DEV_USER_USERNAME
  :Required: No
  :Default: devuser
  :Description: Username for the created user.

DIB_DEV_USER_SHELL
  :Required: No
  :Default: System default (The useradd default is used)
  :Description: Full path for the shell of the user. This is passed to useradd
    using the -s parameter. Note that this does not install the (possibly)
    required shell package.

DIB_DEV_USER_PWDLESS_SUDO
  :Required: No
  :Default: No
  :Description: Enable passwordless sudo for the user.

DIB_DEV_USER_AUTHORIZED_KEYS
  :Required: No
  :Default: $HOME/.ssh/id_{rsa,dsa}.pub
  :Description: Path to a file to copy into this users' .ssh/authorized_keys
    If this is not specified then an attempt is made to use a the building
    user's public key. To disable this behavior specify an invalid path for
    this variable (such as /dev/null).

DIB_DEV_USER_PASSWORD
  :Required: No
  :Default: Password is disabled
  :Description: Set the default password for this user. This is a fairly
    insecure method of setting the password and is not advised.