svn commit: r282691 - projects/release-arm-redux/release/tools
Glen Barber
gjb at FreeBSD.org
Sat May 9 20:23:38 UTC 2015
Author: gjb
Date: Sat May 9 20:23:37 2015
New Revision: 282691
URL: https://svnweb.freebsd.org/changeset/base/282691
Log:
Add a default 'freebsd' user account (password 'freebsd') to allow
a login account via ssh(1), and set the default root password to
'root'.
Discussed with: ian, loos
Sponsored by: The FreeBSD Foundation
Modified:
projects/release-arm-redux/release/tools/arm.subr
Modified: projects/release-arm-redux/release/tools/arm.subr
==============================================================================
--- projects/release-arm-redux/release/tools/arm.subr Sat May 9 20:08:36 2015 (r282690)
+++ projects/release-arm-redux/release/tools/arm.subr Sat May 9 20:23:37 2015 (r282691)
@@ -77,6 +77,18 @@ arm_create_disk() {
return 0
}
+arm_create_user() {
+ # Create a default user account 'freebsd' with the password 'freebsd',
+ # and set the default password for the 'root' user to 'root'.
+ chroot ${CHROOTDIR} /usr/sbin/pw groupadd freebsd -g 1001
+ chroot ${CHROOTDIR} /usr/sbin/pw useradd freebsd \
+ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \
+ -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh'
+ chroot ${CHROOTDIR} /usr/sbin/pw usermod root -w yes
+
+ return 0
+}
+
arm_install_base() {
chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR}
eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \
@@ -86,6 +98,8 @@ arm_install_base() {
installworld installkernel distribution
chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos
+ arm_create_user
+
echo '# Custom /etc/fstab for FreeBSD embedded images' \
> ${CHROOTDIR}/${DESTDIR}/etc/fstab
echo "/dev/ufs/rootfs / ufs rw 1 1" \
More information about the svn-src-projects
mailing list