首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Microsoft为少数属性创建计算机对象操作失败的UndefinedAttributeTypeError

Microsoft为少数属性创建计算机对象操作失败的UndefinedAttributeTypeError
EN

Stack Overflow用户
提问于 2019-12-31 14:08:19
回答 1查看 122关注 0票数 0

每当我们试图在中创建computer对象时,如下所示:

代码语言:javascript
运行
复制
var ldap = require('ldapjs');

var client = ldap.createClient({
  url: 'ldap://<<host>>:389'
});

client.bind('<<Admin DN>>', '<<password>>', function(err) {
  if(err){
      console.log('error',err);
  }else{
      console.log('bind is success');
  }
});

var newDN = "CN=testcomputeruser,OU=testou,DC=test,DC=com";
var newUser = {
    cn: 'newtestComputer334',
    objectClass: 'computer',
    description: 'This is test implementation hence this is test description.', 
    //UndefinedAttributeTypeError:  'msDS-RevealedList':'S:12:RevealedList:CN=RevealedList,OU=testou,DC=test,DC=com',   
    //UndefinedAttributeTypeError   'msDS-isGC':'FALSE',
    //UndefinedAttributeTypeError   'msDS-isRODC':'FALSE',
    //UndefinedAttributeTypeError   'msDS-SiteName':'TestmsDSSiteName', 
    //UndefinedAttributeTypeError   'msDS-IsUserCachableAtRodc':'568974',   
  }

client.add(newDN, newUser,function(err, resp) {
    console.log('newDN : ', newDN);
    console.log('newUser : ' ,newUser);
  if(err){
      console.log('error',err);
  }else{
      console.log('new user is success');
  }
})

在提供了适当的值之后,对于很少的属性(如UndefinedAttributeTypeError ),它在msDS-RevealedList, msDS-isGC, msDS-isRODC, msDS-SiteName and msDS-IsUserCachableAtRodc中失败了。

有没有办法找出同样的问题是什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-12-31 18:11:19

这些都是构造属性,这意味着AD在请求它们时计算这些属性的值。它们是不可写的。

有时,您可以在网上的文档中看到这一点。例如,msDS-RevealedList说:

msDS-RevealedList属性是从msDS-RevealedUsers属性构造的。

但是有些文档页面并没有告诉您这一点,比如msDS-isGC

找出它是否是一个构造属性的最简单的方法是使用AD用户和计算机。确保选择了“查看->高级功能”。然后导航到OU并打开要查看的对象类型的属性(如计算机)。然后转到属性编辑器选项卡。使用‘过滤器’按钮,并确保“只显示”选项被取消选中。然后显示或隐藏构造的属性,并查看您要查找的属性是否显示出来。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59545127

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档