Solve the Problem of saving the MAC address in LDAP

Source: Internet
Author: User

Http://sk363. I .sohu.com/blog/view/131311463.htm

Ldapadd issue
[Root @ centos5 soft] # ldapadd-X-d "cn = manager, Dc = ZQ, Dc = com"-W secret-F ytang. ldif
Adding new entry "uid = ytang, ou = users, ou = Sigma, Dc = ZQ, Dc = com"
Ldapadd: object class violation (65)
Additional Info: attribute 'macaddress' not allowed
Solution:

    • Find the objectclass corresponding to macaddress
      [Root @ centos5 schema] # grep-r macaddress *
      NIS. Schema: attributetype (1.3.6.1.1.22 name 'macaddress'
      NIS. Schema: May macaddress)
      NIS. schema. Default: attributetype (1.3.6.1.1.1.1.22 name 'macaddress'
      NIS. schema. Default: May macaddress)
      In Nis. schema, find:
      Objectclass (1.3.6.1.1.1.2.11 name 'ieee802devic' sup top Auxiliary
      Desc 'a device with a Mac address'
      May macaddress)
      Therefore, the objectclass of macaddress is ieee802device.
    • Add objectclass ieee802device to the ldif File
      [Root @ centos5 soft] # Cat ytang. ldif
      # Ytang
      DN: uid = ytang, ou = users, ou = Sigma, Dc = ZQ, Dc = com
      Objectclass: Top
      Objectclass: person
      Objectclass: inetorgperson
      Objectclass: radiusprofile
      Objectclass: iphost
      Objectclass: ieee802device
      CN: ytang
      SN: ytang
      # Radiustunneltype: 10
      # Radiustunneltype: 13
      # Radiustunnelprivategroupid: 3000
      # Radiustunnelmediumtype: 1
      UID: ytang
      Userpassword: ytang
      Iphostnumber: 192.168.1.10
      Macaddress: 11: 22: 33: 44: 55: 66

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.