From 6689537563b5115f0fbd9088fe8ff8c91e5c6b14 Mon Sep 17 00:00:00 2001 From: nl6720 Date: Fri, 17 Jul 2020 09:04:29 +0300 Subject: Set root user's shell and password with custom /etc/passwd and /etc/shadow Correct shadow file permissions from build.sh. --- configs/releng/airootfs/etc/passwd | 1 + configs/releng/airootfs/etc/shadow | 1 + configs/releng/airootfs/root/customize_airootfs.sh | 3 --- 3 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 configs/releng/airootfs/etc/passwd create mode 100644 configs/releng/airootfs/etc/shadow (limited to 'configs/releng/airootfs') diff --git a/configs/releng/airootfs/etc/passwd b/configs/releng/airootfs/etc/passwd new file mode 100644 index 0000000..2807d5d --- /dev/null +++ b/configs/releng/airootfs/etc/passwd @@ -0,0 +1 @@ +root:x:0:0:root:/root:/usr/bin/zsh diff --git a/configs/releng/airootfs/etc/shadow b/configs/releng/airootfs/etc/shadow new file mode 100644 index 0000000..7edfd69 --- /dev/null +++ b/configs/releng/airootfs/etc/shadow @@ -0,0 +1 @@ +root::14871:::::: diff --git a/configs/releng/airootfs/root/customize_airootfs.sh b/configs/releng/airootfs/root/customize_airootfs.sh index bd9a799..5c98fd6 100755 --- a/configs/releng/airootfs/root/customize_airootfs.sh +++ b/configs/releng/airootfs/root/customize_airootfs.sh @@ -5,10 +5,7 @@ set -e -u sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen locale-gen -usermod -s /usr/bin/zsh root cp -aT /etc/skel/ /root/ -# unset the root password -passwd -d root sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist -- cgit v1.2.3-54-g00ecf