Commit 5427f3af authored by Michael Shigorin's avatar Michael Shigorin

image.in, stage2: reworked TCB fixup hook

The issue at hand is that: /etc/tcb/USER/shadow gets USER:auth ownership (OK); /etc/tcb/USER/shadow- backup file is root:root (broken); /etc/tcb/USER/shadow.lock file is also root:root (broken). This is observed for all pseudousers created by package installation process within working chroots as well as for users created by deflogin feature; the problem is that e.g. echo USER:PASS | chpasswd will break. Looks like the cuplrit might be fakeroot/faked.
parent e02d0cf9
#!/bin/sh -e
# /etc/tcb/<user>/shadow* permissions can be wrong
# if an account was created from installed package
cd /etc/tcb
for u in *; do
chown "$u":auth "$u"/shadow*
done
#!/bin/sh -e
# drop intermediate files not needed in the image
# which receive broken permissions in fakeroot environment
rm -f /etc/tcb/*/shadow{-,.lock}
#!/bin/sh -e
# drop intermediate files not needed in the image
# which receive broken permissions in fakeroot environment
rm -f /etc/tcb/*/shadow{-,.lock}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment