iPXE New Menu Entry with authentication



  • Server
    • FOG Version: 1.3.3
    • OS: centos 6.8
      Hello

    I would like to add menus to deploy by mdt via pxe new machine to create a master image.
    I add a new entry, it’s ok but how could I limit access to this new entry by a login/password ?

    I Tried

    login
    params
    param username ${username}
    param password ${password}
    param advLog1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    cpuid --ext 29 && set arch x64 || set arch x86
    kernel http://${next-server}/wimboot
    initrd http://${next-server}/mdtboot/${arch}/media/Boot/BCD BCD
    initrd http://${next-server}/mdtboot/${arch}/media/Boot/boot.sdi boot.sdi
    initrd -n boot.wim http://${next-server}/mdtboot/${arch}/LiteTouchPE_${arch}.wim boot.wim
    boot
    

    Login and password are requeded but login and password are not checked, so it doesn’t work.



  • Ok thank you


  • Senior Developer

    There are other way’s to handle this support too. I will see what I can do.


  • Senior Developer

    You would need to generate a hook to process menu logins as such.

    Hooks are relatively simple things that allow you to customize your FOG system.

    The event you’d be hooking into is called ALTERNATE_LOGIN_BOOT_MENU_PARAMS However your call should return back to the main boot menu after validation of the login attempt. A second hook, which doesn’t exist yet but I will be adding now that I saw this, would be needed to hand out the action you’re attempting to perform. (The kernel and initrd stuff.) This second hook will be called ALTERNATE_BOOT_CHECKS.

    I realize this doesn’t answer the question or give you a working solution immediately, but I would also add that if you require login support, I’d HIGHLY recommend putting your new menu under Advanced and enable Advanced menu login. This way you’re not having to code hooks to perform customized actions. You would just add the

    kernel http://${next-server}/wimboot
    initrd http://${next-server}/mdtboot/${arch}/media/Boot/BCD BCD
    initrd http://${next-server}/mdtboot/${arch}/media/Boot/boot.sdi boot.sdi
    initrd -n boot.wim http://${next-server}/mdtboot/${arch}/LiteTouchPE_${arch}.wim boot.wim
    boot
    

    portion to your advanced menu as the login stuff would already have been validated to even present this item. If you need it in a menu, you can place it in ipxe menu format to give multiple options.


Log in to reply
 

436
Online

39000
Users

10717
Topics

101757
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.