carbon-config

config submodule of carbon-core-system
git clone https://ccx.te2000.cz/git/carbon-config
Log | Files | Refs

commit 45e15afe2b0ae65c62fefd7d0db56fb899dccb05
parent 83657fd6dc498c7ad919600c233e7f0b334e2a0e
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Fri, 16 Sep 2022 03:42:59 +0200

Align sshd shadow with default, don't set shadow for ccx.

Diffstat:
Mpostinstall.aat | 4++--
Mpostinstall.fileset | 21+--------------------
Mpostinstall.rsfilter | 1-
3 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/postinstall.aat b/postinstall.aat @@ -104,9 +104,9 @@ !f sed -Ee 's|^(root:.*:)[^:]*$|\1{<root_shell>}|' |passwd_user("sshd:x:22:22:sshd:/dev/null:/sbin/nologin") -|shadow_user("sshd:!:10000::::::") +|shadow_user("sshd:!::0:::::") |passwd_user("ccx:x:1000:1000:Jan Pobrislo:/home/ccx:/bin/zsh") -|shadow_user("ccx:*:10000::::::") +|#shadow_user("ccx:*:10000::::::") |} diff --git a/postinstall.fileset b/postinstall.fileset @@ -64,7 +64,7 @@ } }' /etc/shadow f + -!f awk 'BEGIN { FS=OFS=":"; seen=0; line="sshd:!:10000::::::"; split(line, a) } +!f awk 'BEGIN { FS=OFS=":"; seen=0; line="sshd:!::0:::::"; split(line, a) } $1 == a[1] { for(n in a) { if(a[n] != $n) { @@ -109,23 +109,4 @@ print line } }' -/etc/shadow f + -!f awk 'BEGIN { FS=OFS=":"; seen=0; line="ccx:*:10000::::::"; split(line, a) } - $1 == a[1] { - for(n in a) { - if(a[n] != $n) { - print "error: differing present and requested lines" >>"/dev/stderr" - print "requested: " line >>"/dev/stderr" - print "present: " $0 >>"/dev/stderr" - exit 1 - } - } - seen = 1 - } - { print $0 } - END { - if(seen == 0) { - print line - } - }' diff --git a/postinstall.rsfilter b/postinstall.rsfilter @@ -4,4 +4,3 @@ + /etc/passwd + /etc/shadow + /etc/passwd -+ /etc/shadow