windows域控裡,屬性和欄位對映表

dotnetcms.org工作室發表於2018-08-04
 string[] prop = new string[] { 
            "DisplayName", "SamAccountName", "UserPrincipalName", "userAccountControl", "givenName", "sn", 
"name", "Initials", "description", "physicalDeliveryOfficeName", "telephoneNumber", "mail",
"wWWHomePage", "WhenCreated", "streetAddress", "postOfficeBox", "l", "st", "postalCode", "co", "homePhone", "Pager", "mobile", "facsimileTelephoneNumber",
"
ipPhone", "UserWorkstations", "company", "department", "Title", "Manager", "AccountExpires", "PwdLastSet", "DistinguishedName" , whenChangedlastLogofflastLogonpwdLastSetprimaryGroupIDlogonCountobjectCategory };

 部分取值示意值 

DateTime.FromFileTime(PwdLastSet).ToString()

lastLogoff:退出次數

AccountExpires:9223372036854775807 表示2的64次方減1,也就是無限制。

logonCount:14

primaryGroupID 513

lastLogon 131779032897812500

pwdLastSet 131778177763349609

objectCategory      CN=Person,CN=Schema,CN=Configuration,DC=qmx,DC=com

userAccountControl:512 表示 正常,詳見 https://blog.csdn.net/seanzed/article/details/77619985

 DistinguishedName: CN=kevin,OU=HR,DC=qmx,DC=com

PATH:LDAP://qmx.com/CN=kevin,OU=HR,DC=qmx,DC=com

whenChanged:2018/8/5 0:54:58

 

啟明星系統部分欄位對映表。例如在AD域裡,電話號碼是“physicalDeliveryOfficeName”,在啟明星系統裡使用“Tel”欄位。

   string[] tableColumn = new string[] { 
              "FirstName",
              "LastName",
              "DisplayName", 
              "LoginName",
              "Initials",
              "Description",
             "Office",
              "Tel",
              "Mail",
              "Homepage",
              "HomePhone",
              "Mobile",
              "Fax",
              "ipPhone",
              "Company",
              "Dept",
              "Title",
              "ADPath",
              "Status",
              "LogonCount",
              "LastChangedDate" 
        };

        string[] adprop = new string[] { 
              "sn",
              "givenName",
              "DisplayName", 
              "SamAccountName",
              "Initials",
              "description",
              "physicalDeliveryOfficeName",
              "telephoneNumber",
              "mail",
              "wWWHomePage",
              "homePhone",
              "mobile",
              "facsimileTelephoneNumber",
              "ipPhone",
              "company",
              "department",
              "Title",
              "Path",
              "userAccountControl",
              "LogonCount",
              "whenChanged" 
        };

 

 

 

 

相關文章