summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-04-03 11:52:06 -0400
committerScott Moser <smoser@brickies.net>2017-04-03 11:52:06 -0400
commit3b2e493b51153cd5bc1fa91e6ac52f59d41fe3fb (patch)
tree678b118605245e5bb1b218565728270702aba5b4 /doc/examples
parente018fa910fdf0dbf3aa22e59e935461babd205c4 (diff)
parent61eb03fef92f435434d974fb46439189ef0b5f97 (diff)
downloadvyos-cloud-init-3b2e493b51153cd5bc1fa91e6ac52f59d41fe3fb.tar.gz
vyos-cloud-init-3b2e493b51153cd5bc1fa91e6ac52f59d41fe3fb.zip
merge from master at 0.7.9-90-g61eb03fe
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/cloud-config.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt
index c03f1026..bd84c641 100644
--- a/doc/examples/cloud-config.txt
+++ b/doc/examples/cloud-config.txt
@@ -426,14 +426,21 @@ syslog_fix_perms: syslog:root
#
# there is also an option to set multiple users passwords, using 'chpasswd'
# That looks like the following, with 'expire' set to 'True' by default.
-# to not expire users passwords, set 'expire' to 'False':
+# to not expire users passwords, set 'expire' to 'False'. Also possible
+# to set hashed password, here account 'user3' has a password it set to
+# 'cloud-init', hashed with SHA-256:
# chpasswd:
# list: |
# user1:password1
# user2:RANDOM
+# user3:$5$eriogqzq$Dg7PxHsKGzziuEGkZgkLvacjuEFeljJ.rLf.hZqKQLA
# expire: True
# ssh_pwauth: [ True, False, "" or "unchanged" ]
#
+# Hashed passwords can be generated in multiple ways, example with python3:
+# python3 -c 'import crypt,getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))'
+# Newer versions of 'mkpasswd' will also work: mkpasswd -m sha-512 password
+#
# So, a simple working example to allow login via ssh, and not expire
# for the default user would look like:
password: passw0rd