summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/configs/modules
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2017-03-14 15:28:08 -0600
committerScott Moser <smoser@brickies.net>2017-03-17 15:47:54 -0400
commit41950e902f5dd6cb3118280d3d27409812702e41 (patch)
tree892d617dab12876dd4b3e12e67cb1b43080e3bb4 /tests/cloud_tests/configs/modules
parenta33447344eed897010603b3e8ea1fd122052de76 (diff)
downloadvyos-cloud-init-41950e902f5dd6cb3118280d3d27409812702e41.tar.gz
vyos-cloud-init-41950e902f5dd6cb3118280d3d27409812702e41.zip
test: Adding integratiron test for password as list
This adds an integration test for setting passwords when given as a list rather than a string. This also updates the docs and tests so that Random is now RANDOM as is correct.
Diffstat (limited to 'tests/cloud_tests/configs/modules')
-rw-r--r--tests/cloud_tests/configs/modules/set_password_list.yaml20
-rw-r--r--tests/cloud_tests/configs/modules/set_password_list_string.yaml37
2 files changed, 49 insertions, 8 deletions
diff --git a/tests/cloud_tests/configs/modules/set_password_list.yaml b/tests/cloud_tests/configs/modules/set_password_list.yaml
index 36129047..a1eadd75 100644
--- a/tests/cloud_tests/configs/modules/set_password_list.yaml
+++ b/tests/cloud_tests/configs/modules/set_password_list.yaml
@@ -6,22 +6,26 @@ cloud_config: |
ssh_pwauth: yes
users:
- name: tom
- password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ # md5 gotomgo
+ passwd: "$1$S7$tT1BEDIYrczeryDQJfdPe0"
lock_passwd: false
- name: dick
- password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ # md5 gocubsgo
+ passwd: "$1$ssisyfpf$YqvuJLfrrW6Cg/l53Pi1n1"
lock_passwd: false
- name: harry
- password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ # sha512 goharrygo
+ passwd: "$6$LF$9Z2p6rWK6TNC1DC6393ec0As.18KRAvKDbfsGJEdWN3sRQRwpdfoh37EQ3yUh69tP4GSrGW5XKHxMLiKowJgm/"
lock_passwd: false
- name: jane
- password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ # sha256 gojanego
+ passwd: "$5$iW$XsxmWCdpwIW8Yhv.Jn/R3uk6A4UaicfW5Xp7C9p9pg."
lock_passwd: false
chpasswd:
- list: |
- tom:mypassword123!
- dick:R
- harry:Random
+ list:
+ - tom:mypassword123!
+ - dick:RANDOM
+ - harry:RANDOM
collect_scripts:
shadow: |
#!/bin/bash
diff --git a/tests/cloud_tests/configs/modules/set_password_list_string.yaml b/tests/cloud_tests/configs/modules/set_password_list_string.yaml
new file mode 100644
index 00000000..cbb71bee
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/set_password_list_string.yaml
@@ -0,0 +1,37 @@
+#
+# Set password of list of users as a string
+#
+cloud_config: |
+ #cloud-config
+ ssh_pwauth: yes
+ users:
+ - name: tom
+ # md5 gotomgo
+ passwd: "$1$S7$tT1BEDIYrczeryDQJfdPe0"
+ lock_passwd: false
+ - name: dick
+ # md5 gocubsgo
+ passwd: "$1$ssisyfpf$YqvuJLfrrW6Cg/l53Pi1n1"
+ lock_passwd: false
+ - name: harry
+ # sha512 goharrygo
+ passwd: "$6$LF$9Z2p6rWK6TNC1DC6393ec0As.18KRAvKDbfsGJEdWN3sRQRwpdfoh37EQ3yUh69tP4GSrGW5XKHxMLiKowJgm/"
+ lock_passwd: false
+ - name: jane
+ # sha256 gojanego
+ passwd: "$5$iW$XsxmWCdpwIW8Yhv.Jn/R3uk6A4UaicfW5Xp7C9p9pg."
+ lock_passwd: false
+ chpasswd:
+ list: |
+ tom:mypassword123!
+ dick:RANDOM
+ harry:RANDOM
+collect_scripts:
+ shadow: |
+ #!/bin/bash
+ cat /etc/shadow
+ sshd_config: |
+ #!/bin/bash
+ grep '^PasswordAuth' /etc/ssh/sshd_config
+
+# vi: ts=4 expandtab