store a login account in a ipxe menu



  • Server
    • FOG Version: 1.3.4
    • OS: centos 6.8
    Client
    • Service Version:
    • OS:
    Description

    Hello,
    I 'm always looking for a solution for my system learning room and deploying an image locally without account.
    If I write this in the fog.deployimage menu

    #login
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param hostname ${hostname}
    goto host_${hostname} || goto autres
    :host_admin13
    param username toto
    param password toto
    param qihost 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    goto fin
    :autres
    login
    param username ${username}
    param password ${password}
    param qihost 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    :fin
    

    toto account is not accepted, should I encrypt the password, how show I do that ?

    For that room, all the hostnames begin by i201, which syntax could I use to discriminate that machines ?



  • thanks, it works


  • Moderator

    @lebrun78 I suggest doing

    set username toto
    set password toto
    params
    param username ${username}
    param password ${password}
    

    Key points: Set username and password before param tries to use them. Initialize params (you seem to have forgotten that )



  • @Tom-Elliott
    No I always have authentication problem.
    The first pass seems ok
    I get :
    After have valid “deploy image” in boot menu

    http://122.60.15.17/fog/service/ipxeboot.php... ok
    Invalid login!
    


  • nothing, I realize I don’t need it

    Could you explains what are (and where could I find source code) login and params


  • Senior Developer

    @lebrun78 Right, but what’s after it?



  • fin is a label (end in french :-) )


  • Senior Developer

    A new section needs it’s own params setup. At least this is how I might suggest it.

    #login
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param hostname ${hostname}
    goto host_${hostname} || goto autres
    :host_admin13
    params
    param username toto
    param password toto
    param qihost 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    goto fin
    :autres
    login
    params
    param username ${username}
    param password ${password}
    param qihost 1
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    :fin
    

    What’s in the :fin function btw?


Log in to reply
 

444
Online

38930
Users

10694
Topics

101468
Posts

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