Hello,
I am currently trying to create a custom script for bsdinstall for my server. I want to apply the partition layout for that specific machine, as well as install certain packages and create some users at install time. My end goal is to have a non-root user account created on install, as well as an SSH server up and running, after the machine restarts. The SSH daemon should be configured to have password authentication disabled at install time and instead accepts my private key, which I supplied via my script during install. Once I log in via SSH, I'm prompted to set my password (makes sense to not hardcode a passwort for either root or the non-root user).
I'm already struggling to get the basic stuff working however.
My current setup involves following the directions in the bsdinstall(8) manpage under 'SCRIPTING', I inject the following script under
/etc/installerconfig:
I'm testing the script on a VMware virtual machine.
This is the most basic example that is also given in the manpage.
Yet, this fails with a weird error display:
I can't investigate further, as I cannot login on the system (login fails with "/etc/login.conf is not owned by root", which makes sense, given that the installer runs in a chroot environment).
Anyone knows what I'm doing wrong?
I am currently trying to create a custom script for bsdinstall for my server. I want to apply the partition layout for that specific machine, as well as install certain packages and create some users at install time. My end goal is to have a non-root user account created on install, as well as an SSH server up and running, after the machine restarts. The SSH daemon should be configured to have password authentication disabled at install time and instead accepts my private key, which I supplied via my script during install. Once I log in via SSH, I'm prompted to set my password (makes sense to not hardcode a passwort for either root or the non-root user).
I'm already struggling to get the basic stuff working however.
My current setup involves following the directions in the bsdinstall(8) manpage under 'SCRIPTING', I inject the following script under
/etc/installerconfig:
Bash:
PARTITIONS=DEFAULT
DISTRIBUTIONS="kernel.txz base.txz"
#!/bin/sh
sysrc ifconfig_DEFAULT=DHCP
sysrc sshd_enable=YES
pkg install puppet
I'm testing the script on a VMware virtual machine.
This is the most basic example that is also given in the manpage.
Yet, this fails with a weird error display:
I can't investigate further, as I cannot login on the system (login fails with "/etc/login.conf is not owned by root", which makes sense, given that the installer runs in a chroot environment).
Anyone knows what I'm doing wrong?