#!/bin/sh - # setup a base dir DESTDIR="$1" # copied and modified from release/tools/arm.subr # -w yes -> -w no /usr/sbin/pw -R ${DESTDIR} groupadd freebsd -g 1001 mkdir -p ${DESTDIR}/home/freebsd /usr/sbin/pw -R ${DESTDIR} useradd freebsd \ -m -M 0755 -w no -n freebsd -u 1001 -g 1001 -G 0 \ -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/sh' /usr/sbin/pw -R ${DESTDIR} \ usermod root -w yes /usr/bin/sed -i '.bak' \ -e 's/#PasswordAuthentication no/PasswordAuthentication no/' \ -e 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' \ "${DESTDIR}/etc/ssh/sshd_config"