首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何知道Microsoft Active Directory服务器将为特定对象填充哪些属性及其值?

如何知道Microsoft Active Directory服务器将为特定对象填充哪些属性及其值?
EN

Stack Overflow用户
提问于 2019-12-31 20:29:09
回答 1查看 117关注 0票数 0

每当我尝试在Microsoft Active Directory中创建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.', 
    //System will populate 'netbootInitialization':'TestNetbootInitialization',
    //System will populate 'netbootGUID':'b0ae470c-16bc-4019-b455-8c96ec515f55',
    //System will populate 'netbootMachineFilePath':'TestNetbootMachineFilePath',
    //System will populate 'siteGUID':'1010101011', 
    //System will populate 'netbootSIFFile':'TestnetbootSIFFile',
    //System will populate 'netbootMirrorDataFile':'TestnetbootMirrorDataFile',
    //System will populate 'msDS-AdditionalDnsHostName':'TestmsDS-AdditionalDnsHostName',
    //System will populate 'msDS-AdditionalSamAccountName':'TestmsDS-AdditionalSamAccountName',
    //System will populate 'msDS-ExecuteScriptPassword':'10100111100011100',    
    //System will populate 'netbootDUID':'10100111100011010101',    
  }

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');
      //////////////////////////////////////////
      client.unbind(function(err) {
          if(err){
              console.log('error unbind : ',err);
          }else{
              console.log('unbind is success');
          }
        });
      //////////////////////////////////////////    
  }
})

在这里,像netbootSIFFile, netbootMirrorDataFile, msDS-AdditionalDnsHostName, msDS-AdditionalSamAccountName, msDS-ExecuteScriptPassword and netbootDUID这样的属性的值将由Microsoft Active Directory填充。

根据模式,我们找不到任何与此相同的指标。

是否可以从Active Directory(LDAP)架构中查找每个对象类的系统属性?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-01-01 00:19:19

如果通过LDAP读取模式中Computer的类对象(例如CN=Computer,CN=Schema,CN=Configuration,DC=test,DC=com),则可以读取systemMayContain attribute,它是“只能由系统修改”的属性列表。

或者,您可以只创建一个计算机对象,设置它允许的最少数量的属性,然后读取所有具有值的属性。所有未设置值的属性都是系统设置的属性。

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

https://stackoverflow.com/questions/59544177

复制
相关文章

相似问题

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