1*ca987d46SWarner Losh.\" Copyright (c) 2011-2015 Devin Teske 2*ca987d46SWarner Losh.\" All rights reserved. 3*ca987d46SWarner Losh.\" 4*ca987d46SWarner Losh.\" Redistribution and use in source and binary forms, with or without 5*ca987d46SWarner Losh.\" modification, are permitted provided that the following conditions 6*ca987d46SWarner Losh.\" are met: 7*ca987d46SWarner Losh.\" 1. Redistributions of source code must retain the above copyright 8*ca987d46SWarner Losh.\" notice, this list of conditions and the following disclaimer. 9*ca987d46SWarner Losh.\" 2. Redistributions in binary form must reproduce the above copyright 10*ca987d46SWarner Losh.\" notice, this list of conditions and the following disclaimer in the 11*ca987d46SWarner Losh.\" documentation and/or other materials provided with the distribution. 12*ca987d46SWarner Losh.\" 13*ca987d46SWarner Losh.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14*ca987d46SWarner Losh.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15*ca987d46SWarner Losh.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16*ca987d46SWarner Losh.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17*ca987d46SWarner Losh.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18*ca987d46SWarner Losh.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19*ca987d46SWarner Losh.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20*ca987d46SWarner Losh.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21*ca987d46SWarner Losh.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22*ca987d46SWarner Losh.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23*ca987d46SWarner Losh.\" SUCH DAMAGE. 24*ca987d46SWarner Losh.\" 25*ca987d46SWarner Losh.\" $FreeBSD$ 26*ca987d46SWarner Losh.\" 27*ca987d46SWarner Losh.Dd March 20, 2015 28*ca987d46SWarner Losh.Dt CHECK-PASSWORD.4TH 8 29*ca987d46SWarner Losh.Os 30*ca987d46SWarner Losh.Sh NAME 31*ca987d46SWarner Losh.Nm check-password.4th 32*ca987d46SWarner Losh.Nd FreeBSD password-checking boot module 33*ca987d46SWarner Losh.Sh DESCRIPTION 34*ca987d46SWarner LoshThe file that goes by the name of 35*ca987d46SWarner Losh.Nm 36*ca987d46SWarner Loshis a set of commands designed to do one or more of the following: 37*ca987d46SWarner Losh.Pp 38*ca987d46SWarner Losh.Dl o Prevent booting without password 39*ca987d46SWarner Losh.Dl o Prevent modification of boot options without password 40*ca987d46SWarner Losh.Dl o Provide a password to mount geli(8) encrypted root disk(s) 41*ca987d46SWarner Losh.Pp 42*ca987d46SWarner LoshThe commands of 43*ca987d46SWarner Losh.Nm 44*ca987d46SWarner Loshby themselves are not enough for most uses. 45*ca987d46SWarner LoshPlease refer to the 46*ca987d46SWarner Loshexamples below for the most common situations, and to 47*ca987d46SWarner Losh.Xr loader 8 48*ca987d46SWarner Loshfor additional commands. 49*ca987d46SWarner Losh.Pp 50*ca987d46SWarner LoshBefore using any of the commands provided in 51*ca987d46SWarner Losh.Nm , 52*ca987d46SWarner Loshit must be included 53*ca987d46SWarner Loshthrough the command: 54*ca987d46SWarner Losh.Pp 55*ca987d46SWarner Losh.Dl include check-password.4th 56*ca987d46SWarner Losh.Pp 57*ca987d46SWarner LoshThis line is present in 58*ca987d46SWarner Losh.Pa /boot/loader.4th 59*ca987d46SWarner Loshfile, so it is not needed (and should not be re-issued) in a normal setup. 60*ca987d46SWarner Losh.Pp 61*ca987d46SWarner LoshThe commands provided by it are: 62*ca987d46SWarner Losh.Pp 63*ca987d46SWarner Losh.Bl -tag -width disable-module_module -compact -offset indent 64*ca987d46SWarner Losh.It Ic check-password 65*ca987d46SWarner LoshMulti-purpose function that can protect the interactive boot menu, 66*ca987d46SWarner Loshprevent boot without password, or prompt for geli(8) passphrase 67*ca987d46SWarner Losh.Pq depending on Xr loader.conf 5 settings . 68*ca987d46SWarner Losh.Pp 69*ca987d46SWarner LoshFirst checks 70*ca987d46SWarner Losh.Va bootlock_password 71*ca987d46SWarner Loshand if-set, the user cannot continue until the correct password is entered. 72*ca987d46SWarner Losh.Pp 73*ca987d46SWarner LoshNext, checks 74*ca987d46SWarner Losh.Va geom_eli_passphrase_prompt 75*ca987d46SWarner Loshand if set to 76*ca987d46SWarner Losh.Li YES 77*ca987d46SWarner Losh.Pq case-insensitive 78*ca987d46SWarner Loshprompts the user to enter their GELI password for later mounting of the root 79*ca987d46SWarner Loshdevice(s) during boot. 80*ca987d46SWarner Losh.Pp 81*ca987d46SWarner LoshLast, checks 82*ca987d46SWarner Losh.Va password 83*ca987d46SWarner Loshand if-set, tries to 84*ca987d46SWarner Losh.Ic autoboot 85*ca987d46SWarner Loshand only prompts for password on failure or user-interrupt. 86*ca987d46SWarner LoshSee 87*ca987d46SWarner Losh.Xr loader.conf 5 88*ca987d46SWarner Loshfor additional information. 89*ca987d46SWarner Losh.El 90*ca987d46SWarner Losh.Pp 91*ca987d46SWarner LoshThe environment variables that effect its behavior are: 92*ca987d46SWarner Losh.Bl -tag -width bootlock_password -offset indent 93*ca987d46SWarner Losh.It Va bootlock_password 94*ca987d46SWarner LoshSets the bootlock password (up to 16 characters long) that is required by 95*ca987d46SWarner Losh.Ic check-password 96*ca987d46SWarner Loshto be entered before the system is allowed to boot. 97*ca987d46SWarner Losh.It Va geom_eli_passphrase_prompt 98*ca987d46SWarner LoshSelects whether loader(8) will prompt for GELI credentials, handing-off to the 99*ca987d46SWarner Loshkernel for later mounting of 100*ca987d46SWarner Losh.Xr geli 8 101*ca987d46SWarner Loshencrypted root device(s). 102*ca987d46SWarner Losh.It Va password 103*ca987d46SWarner LoshSets the password (up to 16 characters long) that is required by 104*ca987d46SWarner Losh.Ic check-password 105*ca987d46SWarner Loshbefore the user is allowed to visit the boot menu. 106*ca987d46SWarner Losh.El 107*ca987d46SWarner Losh.Sh FILES 108*ca987d46SWarner Losh.Bl -tag -width /boot/check-password.4th -compact 109*ca987d46SWarner Losh.It Pa /boot/loader 110*ca987d46SWarner LoshThe 111*ca987d46SWarner Losh.Xr loader 8 . 112*ca987d46SWarner Losh.It Pa /boot/check-password.4th 113*ca987d46SWarner Losh.Nm 114*ca987d46SWarner Loshitself. 115*ca987d46SWarner Losh.It Pa /boot/loader.rc 116*ca987d46SWarner Losh.Xr loader 8 117*ca987d46SWarner Loshbootstrapping script. 118*ca987d46SWarner Losh.El 119*ca987d46SWarner Losh.Sh EXAMPLES 120*ca987d46SWarner LoshStandard i386 121*ca987d46SWarner Losh.Pa /boot/loader.rc : 122*ca987d46SWarner Losh.Pp 123*ca987d46SWarner Losh.Bd -literal -offset indent -compact 124*ca987d46SWarner Loshinclude /boot/loader.4th 125*ca987d46SWarner Loshcheck-password 126*ca987d46SWarner Losh.Ed 127*ca987d46SWarner Losh.Pp 128*ca987d46SWarner LoshSet a password in 129*ca987d46SWarner Losh.Xr loader.conf 5 130*ca987d46SWarner Loshto prevent modification of boot options: 131*ca987d46SWarner Losh.Pp 132*ca987d46SWarner Losh.Bd -literal -offset indent -compact 133*ca987d46SWarner Loshpassword="abc123" 134*ca987d46SWarner Losh.Ed 135*ca987d46SWarner Losh.Pp 136*ca987d46SWarner LoshSet a password in 137*ca987d46SWarner Losh.Xr loader.conf 5 138*ca987d46SWarner Loshto prevent booting without password: 139*ca987d46SWarner Losh.Pp 140*ca987d46SWarner Losh.Bd -literal -offset indent -compact 141*ca987d46SWarner Loshbootlock_password="boot" 142*ca987d46SWarner Losh.Ed 143*ca987d46SWarner Losh.Pp 144*ca987d46SWarner LoshAdd the following to 145*ca987d46SWarner Losh.Xr loader.conf 5 146*ca987d46SWarner Loshto generate a prompt at boot to collect GELI credentials for mounting 147*ca987d46SWarner Losh.Xr geli 8 148*ca987d46SWarner Loshencrypted root device(s): 149*ca987d46SWarner Losh.Pp 150*ca987d46SWarner Losh.Bd -literal -offset indent -compact 151*ca987d46SWarner Loshgeom_eli_passphrase_prompt="YES" 152*ca987d46SWarner Losh.Ed 153*ca987d46SWarner Losh.Sh SEE ALSO 154*ca987d46SWarner Losh.Xr loader.conf 5 , 155*ca987d46SWarner Losh.Xr loader 8 , 156*ca987d46SWarner Losh.Xr loader.4th 8 157*ca987d46SWarner Losh.Sh HISTORY 158*ca987d46SWarner LoshThe 159*ca987d46SWarner Losh.Nm 160*ca987d46SWarner Loshset of commands first appeared in 161*ca987d46SWarner Losh.Fx 9.0 . 162*ca987d46SWarner Losh.Sh AUTHORS 163*ca987d46SWarner LoshThe 164*ca987d46SWarner Losh.Nm 165*ca987d46SWarner Loshset of commands was written by 166*ca987d46SWarner Losh.An -nosplit 167*ca987d46SWarner Losh.An Devin Teske Aq dteske@FreeBSD.org . 168