From d427aff1a7c7902e6eade012956c5ec9060cc60b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 28 Feb 2008 09:30:04 -0800 Subject: fix ssh allow-root template Bugfix: 2909 1. Change name so telnet and ssh syntax are similar 2. Fix to always return true so update suceeds 3. No need to delete entry on removal of ssh service --- templates/service/ssh/allow-root/node.def | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 templates/service/ssh/allow-root/node.def (limited to 'templates/service/ssh/allow-root/node.def') diff --git a/templates/service/ssh/allow-root/node.def b/templates/service/ssh/allow-root/node.def new file mode 100644 index 00000000..f476087d --- /dev/null +++ b/templates/service/ssh/allow-root/node.def @@ -0,0 +1,15 @@ +type: bool +default: false +help: Enable/disable root login over ssh +update: if [ \"$VAR(@)\" == \"true\" ]; then + sudo ed - /etc/ssh/sshd_config <<-"EOF" + /^PermitRootLogin/s/no/yes/ + wq + EOF + else + sudo ed - /etc/ssh/sshd_config <<-"EOF" + /^PermitRootLogin/s/yes/no/ + wq + EOF + fi + /bin/true -- cgit v1.2.3