Relabel /home after creating a new user

Otherwise after login on serial console we get:

[..]
fedora-riscv login: riscv
Password:
Last login: Wed May  1 06:53:19 from 10.0.2.2
 -- riscv: /home/riscv: change directory failed: Permission denied
Logging in with home = "/".
[riscv@fedora-riscv /]$
[..]

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2024-05-01 14:12:54 +03:00
parent 354c39b72f
commit 3c69de94e0
Signed by: davidlt
GPG Key ID: 7A5F42FAF91FACC3
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,9 @@ echo fedora_rocks! | passwd --stdin riscv
# Mock is not installed by default in Minimal disk image
#/usr/sbin/usermod -aG mock riscv
# Relabel after creating a new user
/sbin/restorecon -T0 -R -v /home
# Create Fedora RISC-V repo
cat << EOF > /etc/yum.repos.d/fedora-riscv.repo
[fedora-riscv]