From d98416fefc7687c0832b972d17dd2eb22627ec06 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sat, 13 Nov 2021 17:27:28 +0100 Subject: [PATCH] de-p1st-ssh: allow for root --- pkg/de-p1st-ssh-key-yoda/PKGBUILD | 10 +++++++--- pkg/de-p1st-ssh/PKGBUILD | 2 +- pkg/de-p1st-ssh/sshd_config.holoscript | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg/de-p1st-ssh-key-yoda/PKGBUILD b/pkg/de-p1st-ssh-key-yoda/PKGBUILD index a6b41ca..eaba2c1 100644 --- a/pkg/de-p1st-ssh-key-yoda/PKGBUILD +++ b/pkg/de-p1st-ssh-key-yoda/PKGBUILD @@ -2,9 +2,9 @@ _pkgname=ssh-key-yoda _reponame=arch pkgname="de-p1st-$_pkgname" -pkgver=0.0.3 -pkgrel=2 -pkgdesc="ssh authorized_keys for user yoda with uid 1000" +pkgver=0.1.0 +pkgrel=1 +pkgdesc="ssh authorized_keys for root (uid=0) and yoda (uid=1000)" arch=('any') url="https://codeberg.org/privacy1st/${_reponame}" license=('MIT') @@ -21,4 +21,8 @@ package() { install -dm0700 -o1000 "$pkgdir"/home/yoda/ install -dm0700 -o1000 "$pkgdir"/home/yoda/.ssh/ install -m0600 -o1000 authorized_keys "$pkgdir"/home/yoda/.ssh/authorized_keys + + install -dm0700 -o0 "$pkgdir"/root/ + install -dm0700 -o0 "$pkgdir"/root/.ssh/ + install -m0600 -o0 authorized_keys "$pkgdir"/root/.ssh/authorized_keys } diff --git a/pkg/de-p1st-ssh/PKGBUILD b/pkg/de-p1st-ssh/PKGBUILD index b601044..5b85abf 100644 --- a/pkg/de-p1st-ssh/PKGBUILD +++ b/pkg/de-p1st-ssh/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=ssh _reponame=arch pkgname="de-p1st-$_pkgname" -pkgver=0.0.9 +pkgver=0.1.0 pkgrel=1 pkgdesc="ssh with configuration" arch=('any') diff --git a/pkg/de-p1st-ssh/sshd_config.holoscript b/pkg/de-p1st-ssh/sshd_config.holoscript index 511f51c..390d24b 100755 --- a/pkg/de-p1st-ssh/sshd_config.holoscript +++ b/pkg/de-p1st-ssh/sshd_config.holoscript @@ -28,7 +28,7 @@ echo "$stdin" | grep --quiet '^#X11Forwarding\s.*$' echo "=== sed ===" 1>&2 echo "$stdin" | sed ' - s|^#PermitRootLogin\s.*$|PermitRootLogin no|; + s|^#PermitRootLogin\s.*$|PermitRootLogin yes|; s|^#PubkeyAuthentication\s.*$|PubkeyAuthentication yes|; s|^#PasswordAuthentication\s.*$|PasswordAuthentication no|; s|^#PermitEmptyPasswords\s.*$|PermitEmptyPasswords no|;