Full Host Registration - Prompt for password prior to asking inventory questions

  • Hi all,
    We’re building out a new fog server, running 1.4.4. Much has changed since 0.32. I would like to prompt for a username and password immediately after the selection of “Preform Full Host Registration and Inventory”, similarly to Quick Host Deletion or Deploy Image. I don’t want to give users the ability to add or register a host with fog before auth.

    Looking at the config Fog menu Configuration page I see “fog.reginput” does not pass parameters like “fog.deployimage”

    I tried just guessing with the code below, but manreg does not work.

    param mac0 ${net0/mac}
    param arch ${arch}
    param username ${username}
    param password ${password}
    param manreg 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme

    According to the bootmenu.class.php file code there is not a parameter for this menu selection only advLog, delhost, keyreg, qihost, sessionJoin, approveHost, menuaccess, debugAccess

    I am aware this menu selection will prompt for a username and password, but this only happens after the registration questions are asked. (I can modify fog.man.reg to move authentication code in the bash, but would like to keep this consistent with all other menu items)

    Any suggestions?


  • @robertd Checkout the below image, this is how you password-protect the entire fog menu. This will accomplish what you’re after. Technicians need only to enter the key-combination in order to be prompted for user/pass credentials. The accepted credentials are those in the FOG web interface users area.

    0_1503530821572_hide menu password.png

  • Moderator

    Hi and welcome to the fog forums.

    YES fog has changed many times over since FOG 0.3x.

    If you feel you have a understanding of what has changed. I might suggest that you fork the FOG project from github, modify what is needed, and then push the changes back. The developers will look over the changes and potentially integrate the changes into the base code.

    Right now I can tell you the developers are on an extended holiday and won’t be back for a little while, so if your change is urgent and you have the skills you might want to do as I outlined above.

    The FOG 1.5.0 RC8 is the current rc release. The developers have been working hard on the new UI that is part of 1.5.0 and I think the RC8 is close to the last release before 1.5.0 (stable) is released. So now would be a good time if you need your changes in the code base soon.

    [Moderator’s note] This thread is more of a feature request than a technical problem. I’m moving it to the Feature Request forum.

  • Also it appears the registration process does not check to see if the image id the user types is a valid ID. It only checks to see if it’s a number.

    Maybe the checkAndSet() function inside fog.man.reg can do this in a future release?