Poudriere Image Questions

Well I have Poudriere Image spitting out images. NanoBSD style using the -t firmware switch.
I was able to use my NanoBSD overlay directory directly for Poudriere Image file overlays for configuration.

So it went pretty smoothly but I have a few sticking points. Looking for suggestions.

First missing feature from my NanoBSD config file is my root-password script.
Code:
cust_rootpasswd() (
    echo 'freebsd' | pw -V ${NANO_WORLDDIR}/etc/ usermod root -h 0
)
How can I add a default root password with Poudriere Image?

The other question is how to add root enabled=YES to sshd_config?
I have added a modified sshd_config to my overlay so that works.

I am tempted to do the same for a root password but unsure about the encrytped password file.
Any suggestions for a new Poudriere Image user?

I needed to make UEFI appliance images and Poudriere seemed to have a method that works.
I used this page to get started:
 
I ended up copying the needed password files to my overlay directory from an active installation to add a root password to my Poudriere Image.
master.passwd
passwd
pwd.db
spwd.db

So I added all my WITHOUT= files and ended up with two 450MB gpt partitions for the OS.
 
I wanted to correctly create accounts so I used the Poudriere Image flag "-A" After to run a post script to customize the image.
/poudriere/post-script.sh
Code:
#!/bin/sh
#
TO_REMOVE='
usr/local/share
'

if [ -z "${WORLDDIR}" ]; then
    echo "ERROR: Empty variable WORLDDIR"
    exit 1
fi

for i in ${TO_REMOVE}; do
    if [ -e ${WORLDDIR}/$i ]; then
        rm -rf ${WORLDDIR}/$i
    fi
done
#
pw -V ${WORLDDIR}/etc useradd freebsd -w yes
pw -V ${WORLDDIR}/etc usermod -n root -w yes
#
This creates accounts just like the FreeBSD Arm Images.
A much cleaner approach instead of hamfisted copying.
 
Back
Top