diff options
author | Colin Watson <cjwatson@debian.org> | 2014-03-31 12:19:50 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-03-31 12:19:50 +0100 |
commit | 925ef19ebf37c5e4936a08a8e8afa93658104cdc (patch) | |
tree | c6dc1ca265ad93dbf8a772d3e25894119a65a2fb | |
parent | a2cb53c651d696101b8e7b07ddd160f3b41c29fe (diff) |
If no root password is set, then switch to "PermitRootLogin without-password" without asking (LP: #1300127).
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/openssh-server.config | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 5d10b5654..c581ff0fa 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -1,3 +1,10 @@ | |||
1 | openssh (1:6.6p1-2) UNRELEASED; urgency=medium | ||
2 | |||
3 | * If no root password is set, then switch to "PermitRootLogin | ||
4 | without-password" without asking (LP: #1300127). | ||
5 | |||
6 | -- Colin Watson <cjwatson@debian.org> Mon, 31 Mar 2014 11:15:02 +0100 | ||
7 | |||
1 | openssh (1:6.6p1-1) unstable; urgency=medium | 8 | openssh (1:6.6p1-1) unstable; urgency=medium |
2 | 9 | ||
3 | [ Colin Watson ] | 10 | [ Colin Watson ] |
diff --git a/debian/openssh-server.config b/debian/openssh-server.config index 27594ad2d..883dbf41b 100644 --- a/debian/openssh-server.config +++ b/debian/openssh-server.config | |||
@@ -16,8 +16,12 @@ get_config_option() { | |||
16 | 16 | ||
17 | if dpkg --compare-versions "$2" lt-nl 1:6.6p1-1 && \ | 17 | if dpkg --compare-versions "$2" lt-nl 1:6.6p1-1 && \ |
18 | [ "$(get_config_option PermitRootLogin)" = yes ]; then | 18 | [ "$(get_config_option PermitRootLogin)" = yes ]; then |
19 | db_input high openssh-server/permit-root-login || true | 19 | if [ "$(getent shadow root | cut -d: -f2)" = "!" ]; then |
20 | db_go | 20 | db_set openssh-server/permit-root-login true |
21 | else | ||
22 | db_input high openssh-server/permit-root-login || true | ||
23 | db_go | ||
24 | fi | ||
21 | fi | 25 | fi |
22 | 26 | ||
23 | exit 0 | 27 | exit 0 |