Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package openSUSE-Tumbleweed-Yomi for openSUSE:Factory checked in at 2021-05-01 00:46:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openSUSE-Tumbleweed-Yomi (Old) and /work/SRC/openSUSE:Factory/.openSUSE-Tumbleweed-Yomi.new.1947 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-Tumbleweed-Yomi" Sat May 1 00:46:49 2021 rev:19 rq:889511 version:1.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/openSUSE-Tumbleweed-Yomi/openSUSE-Tumbleweed-Yomi.changes 2021-04-01 14:19:57.516207694 +0200 +++ /work/SRC/openSUSE:Factory/.openSUSE-Tumbleweed-Yomi.new.1947/openSUSE-Tumbleweed-Yomi.changes 2021-05-01 00:46:51.799408005 +0200 @@ -1,0 +2,5 @@ +Fri Apr 23 09:20:49 UTC 2021 - Alberto Planas Dominguez <apla...@suse.com> + +- Add parameter "ym.sshd" to add PermitEmptyPasswords + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ config.sh ++++++ --- /var/tmp/diff_new_pack.1Uoi2F/_old 2021-05-01 00:46:52.355405528 +0200 +++ /var/tmp/diff_new_pack.1Uoi2F/_new 2021-05-01 00:46:52.355405528 +0200 @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -52,9 +52,6 @@ passwd -d root pam-config -a --nullok -# Support SSH into the root user -# echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config - #====================================== # Specify default runlevel #-------------------------------------- @@ -237,6 +234,32 @@ ExecStartPre=/usr/bin/yomi-config.sh EOF +mkdir -p /etc/systemd/system/sshd.service.d/ + +# Add a systemd overlay for sshd.service, that will allow passwordless +# login via the kernel command line. +# TODO: use a different unit with ConditionKernelCommandLine +cat > /usr/bin/yomi-sshd.sh <<-'EOF' + #!/bin/sh + + # Search for the parameter 'ym.sshd=' in /proc/cmdline + while IFS= read -r line; do + [[ "$line" =~ ^ym.sshd=.*$ ]] && sshd="${line#ym.sshd=}" + done <<< "$(cat /proc/cmdline | xargs -n1)" + + # If the paremeter is "1" or "y", change the config file + if [ "$sshd" = "1" ] || [ "$sshd" = "y" ]; then + echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config + fi +EOF +chmod a+x /usr/bin/yomi-sshd.sh + +cat > /etc/systemd/system/sshd.service.d/10-yomi-sshd.conf <<-EOF + [Service] + ExecStartPre=/usr/bin/yomi-sshd.sh +EOF + + systemctl enable salt-minion.service #======================================