Password protecting PXE menu item
-
I have Parted Magic as a PXE menu item and would like to password protect it.
currently, my PXE menu entry looks like:
login kernel http://${fog-ip}/pmagic/bzImage edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256 boot=live ip=dhcp noapic sleep=0 loglevel=0 keymap=us splash quiet initrd http://${fog-ip}/pmagic/initrd.img initrd http://${fog-ip}/pmagic/PMAGIC_2013_08_01.SQFS.cgz boot
It prompts you for a login and password but will continue to the Parted Magic regardless of what is entered for credentials.
-
I just went ahead and password protected the whole PXE menu with the ESC option.
Thanks anyways. -
I’m not fully sure how to implement proper login checking. This is a feature that is kind of in flux. When initially coding the ipxe stuff, there was a lot of ties in to protect things that were “natural” to the main menu. However, this made making password protected items less possible because there isn’t a nice easy api in ipxe to call back and check “login” against a url.
The current password protected items have 2 different elements. The first is to pass the login stuff to the second element, and that second element cross checks login capability and passes through if all passes properly. It’s because of this double step that currently custom pxe items can’t just have a password protection nicely integrated. It would need a secondary element tied in to the main boot code. This could be done with hooks I’m sure, but it’s still fairly complicated. The simplest methods would be to do as you did (use ESC to force all menu items to be login protected) or use the advanced menu with login enabled.