ActiveDirectory

linuxからwindwosのActiveDirectory共有フォルダに接続する時のメモ。

Kerberos認証の設定 /etc/krb5.conf ファイルを編集する。 ネームサーバーの指定 /etc/resolv.conf ファイルを編集する。 システム時間の設定 DCと5分ぐらい差があると蹴られるはず。NTPはDCを参照する マウント mount.cifsが必要 samba3.5だとsamba-client…

Hey, Scripting Guy! DN を finance.fabrikam.com/Users という形式に変換する方法はありますか

Hey, Scripting Guy! DN を finance.fabrikam.com/Users という形式に変換する方法はありますかあれ?なんかちがくね? オレの求めてるものと違う・・・。てわけで。 On Error Resume Next Set objSysInfo = CreateObject("ADSystemInfo") strUser = objSysI…

vbsでアカウントパスワードリセット(変更)

vbsパスワードリセット(変更) Option Explicit dim ldap ldap = "LDAP://CN=aaaa,OU=Users,DC=mydomain,DC=local" dim objUser set objUser = GetObject(ldap) dim last last = objUser.PasswordLastChanged objUser.SetPassword "aaaaaaaa" objUser.SetIn…

FSMO(操作マスタ)転送

Windows 2008 R2 GUIでFSMO転送 FSMOの役割 PDC(primary domain controller) RID インフラストラクチャ スキーマ 名前付けマスター PDCとRIDとインフラストラクチャに関しては「Active Directory ユーザーとコンピューター」で可能 ツリー3番目のドメインを…

Active Directory property type

ADの属性の型を知りたい。 Active Directory スキーマ見ればわかると思ったんだけど。。。 スキーマの格納場所 CN=Schema,CN=Configuration,DC= OMSyntaxとかattributeSyntaxの属性で定義されているっぽい。 type じゃなくて syntax なのね。 おなじみtechne…

AD オブジェクト1000件以上を取得

DirectorySearcher.PageSizeを増やす。デフォルトは0。 DirectorySearcher.SizeLimitは増やしたところで最高値はサーバーの設定が優先される。デフォルトは0。サーバーのデフォルトが1000。

AD属性一覧

cls $cn = "CN="; $schema = [DirectoryServices.ActiveDirectory.ActiveDirectorySchema]::GetCurrentSchema(); $Searcher = New-Object System.DirectoryServices.DirectorySearcher( $cn ); $reslt = $Searcher.FindOne(); foreach( $properties in $resl…

PowershellでActiveDirectoryオブジェクトの属性を変更する。

絶対値が取れるのが前提。エラー処理とかないよ。 $targetAccountName = ""; $root = New-Object DirectoryServices.DirectoryEntry( 'LDAP://rootDSE' ) $dn = $root.defaultNamingContext.Value; $entry = New-Object DirectoryServices.DirectoryEntry( "…

ドメインコンローラー内のオブジェクトを列挙

所属ドメコンで権限がある場合。 所属ドメコン内のオブジェクトを列挙。 参照設定:Com の「Active DS Type Library」と「System.DirectoryServices」が必要。 static void Main( string[] args ) { try { DirectoryEntry rootEntry = new DirectoryEntry( "…