Results 1 to 2 of 2

Thread: DHCP Server Adding custom options with LDAP

  1. #1

    Default DHCP Server Adding custom options with LDAP

    Hi,

    I'm trying to add the following custom rule which would normally be added to dhcpd.conf, however in my case all of the configuration is stored in LDAP.

    Code:
    option space ubnt;
    option ubnt.unifi-address code 1 = ip-address;
    
    
    class "ubnt" {
            match if substring (option vendor-class-identifier, 0, 4) = "ubnt";
            option vendor-class-identifier = "ubnt";
            vendor-option-space ubnt;
    }
    I don't see a way to do this in YaST. Note that this is on 42.3. I haven't migrated my server to 15.0 (and I'm not looking forward to it).

    I tried using dhcpd-conf-to-ldap to create a LDIF file, but it can't be imported using ldapadd.

    It would be great if YaST could support custom options and classes like this.

    The resulting LDIF file is:
    Code:
    dn: cn=yyyyy, dc=xxxxxx,dc=org
    cn: yyyyy
    objectClass: top
    objectClass: dhcpServer
    dhcpServiceDN: cn=DHCP Config, dc=xxxxxx,dc=org
    
    
    dn: cn=DHCP Config, dc=xxxxxx,dc=org
    cn: DHCP Config
    objectClass: top
    objectClass: dhcpService
    objectClass: dhcpOptions
    dhcpPrimaryDN: cn=yyyyy, dc=xxxxxx,dc=org
    dhcpOption: space ubnt
    dhcpOption: ubnt.unifi-address code 1 = ip-address
    
    
    dn: cn=ubnt, cn=DHCP Config, dc=xxxxxx,dc=org
    cn: ubnt
    objectClass: top
    objectClass: dhcpClass
    objectClass: dhcpOptions
    dhcpStatements: match if substring (option vendor-class-identifier, 0, 4) = "ubnt"
    dhcpStatements: vendor-option-space ubnt
    dhcpOption: vendor-class-identifier = "ubnt"
    -Aaron

  2. #2
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,246

    Default Re: DHCP Server Adding custom options with LDAP

    @aaron_w2:

    There are warnings in the openSUSE documentation that, when the DHCP server is using LDAP, then the LDAP environment has to be setup before the YaST DHCP module can be used for further administration: <https://doc.opensuse.org/documentati...#sec.dhcp.yast>
    Also: <https://doc.opensuse.org/documentati...ap.yast.usergr> and
    <https://doc.opensuse.org/documentati...ity.ldap.slapd>.
    The initial YaST LDAP administration form seems to offer the possibility to setup options and especially search filters for the users and groups in the LDAP database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •