레이블이 Active Directory인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Active Directory인 게시물을 표시합니다. 모든 게시물 표시

2018-01-23

Active Directory Domain에 Join된 컴퓨터를 Unjoin 하기 위한 명령어

Active Directory Domain에 Join된 컴퓨터를 Unjoin 하기 위한 명령어입니다.


start /B /W wmic.exe /interactive:off ComputerSystem Where "Name='%computername%'" Call UnJoinDomainOrWorkgroup FUnjoinOptions=0

start /B /W wmic.exe /interactive:off ComputerSystem Where "Name='%computername%'" Call JoinDomainOrWorkgroup name="WORKGROUP"
shutdown.exe /r /t 0 /f


또는 PowerShell을 사용할 경우
Powershell.exe Remove-Computer -Force -Restart

로 하면 되지만, AD 서버를 Access해야 함.




Active Directory Domain 에 Join 시 RPC 사용 TCP Port


Active Directory Domain 에 Join 시 RPC 사용 TCP Port


응용 프로그램 프로토콜 프로토콜 포트
RPC TCP 135
임의로 할당된 상위 TCP 포트¹ TCP 1024~65535 사이의 임의 포트 번호
49152 - 65535 사이의 임의 포트 번호²

출처

Aruba ClearPass 장비에서 AD 인증을 UPN으로 설정하기


Aruba ClearPass 장비에서 AD 인증을 UPN으로 설정하기 위해서는
인증을 위한 속성을 하기와 같이 변경하면 됩니다.


UPN authentication with clearpass and active directory

기본 설정값은 sAMAccountName으로 인증하도록 설정되어 있음.
(&(objectClass=user)(sAMAccountName=%{Authentication:Username}))

이를 UPN으로도 인증되도록 설정을 아래와 같이 추가 하면 됩니다.
(|(&(objectClass=user)(sAMAccountName=%{Authentication:Username}))(&(objectClass=user)(userPrincipalName=%{Authentication:Username})))

 

AD Domain 에 Join 된 컴퓨터의 컴퓨터명을 레지스트리 키 값을 설정하여 변경하기

AD Domain 에 Join 된 컴퓨터의 컴퓨터명을 Win32 API나 관련 도구로 변경 시 AD 서버에 액세스를 시도하게 되는데, 네트워크 연결없이 레지스트리 키 값 설정만으로 컴퓨터명을 변경할 수 있습니다.


reg add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /v "ComputerName" /d "NEW-HOSTNAME" /f
reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "NV Hostname" /d "
NEW-HOSTNAME" /

상기 레지스트리 키 값을 설정하고 컴퓨터를 재시작하면 컴퓨터명이 변경됩니다.


[참고]
WMI 명령어로 컴퓨터명 변경

명령어로 컴퓨터명 변경하기

wmic ComputerSystem Where Name="%COMPUTERNAME%" Call Rename Name="NEW-HOSTNAME"

2011-01-24

Active Directory UPN suffixes

Active Directory UPN suffixes 에 대해서?  AD의 제한사항에 대해 확인해 보니 다음과 같다고..


- maximum number of GPOs that can apply to a user/computer: 999
- maximum number of DNS servers in an AD-integrated zone (without manually adding the details): 850 (Windows 2000), 1300 (Windows 2003)
- maximum number of supported DCs in a given domain: 1200
- maximum number of members of a group: 5000 (Windows 2000), unlimited in Windows 2003
- maximum number of DHCP servers in a forest: 850 (Windows 2000 SP1 or RTM), unlimited (Windows 2000 SP2 or later and Windows 2003)
- maximum number of UPN suffixes that can be set through the UI: 850 (you can set more if you need to via ADSI scripts)
- maximum number of objects that can be created over the lifetime of a given DIT (i.e. the AD database on a given DC): 2 billion

이때 upnSuffixes attribute의 값 속성과 제한이 OS version 별로 차이가 있는지 확인이 필요해 관련 KB(http://support.microsoft.com/kb/269441, http://social.technet.microsoft.com/Forums/en/winserverDS/thread/22fe2cd4-0d4f-4306-ab64-751a120d77fb )를 찾아보니 딱히 원하는 정보를 찾기 어렵네..


uPNSuffixes schema에 대한 정보는 다음과 같다.



This attribute specifies the list of User-Principal-Name suffixes for a forest.
cn: UPN-Suffixes
ldapDisplayName: uPNSuffixes
attributeId: 1.2.840.113556.1.4.890
attributeSyntax: 2.5.5.12
omSyntax: 64
isSingleValued: FALSE
schemaIdGuid: 032160bf-9824-11d1-aec0-0000f80367c1
systemOnly: FALSE
searchFlags: 0
systemFlags: FLAG_SCHEMA_BASE_OBJECT
schemaFlagsEx: FLAG_ATTR_IS_CRITICAL
Version-Specific Behavior: Implemented on Microsoft Windows® 2000 Server operating system, Windows Server® 2003 operating system, Windows Server® 2003 R2 operating system, Windows Server® 2008 operating system, and Windows Server® 2008 R2 operating system.

해당 uPNSuffixes의 attribute는 multi-value 이긴 하지만, 그 최대값이 Windows 2008 R2에서 얼마인지 확인이 어렵네..


다른 글을 찾아보니

  • GUI limits number of suffixes possible to be entered at forest level to 850 (Andrew Levicki), more can be added with scripts
  • more means ~1300 in Windows 2003 and later UPN suffixes which can be stored in upnSuffixes attribute on CN=Partitions, and with script you can enter whatever you like for specific user (joe). It is UI which enforces forest wide suffixes on user object. And You have to be careful  if it is configuration with forest trust [1]. But for that number of users and suffixes probably GUI won’t be preferred tool.
  • We have explicit and implicit types of UPNs (Rick S.). See also KB 929272.
  • If you want to use GUI anyway you can easily extend context menu with some script which will allow you to set desired UPN suffix for a user (Jorge).

AD사용자 및 컴퓨터 관리도구 UI에서는 850개까지이고 scripts를 사용할 경우에는 1300이 최대한일 듯 싶다.







12.3 비상계엄령으로 친위쿠데타를 일으킨 윤석열과 그에 동조하는 국민의힘 의원은 모두 심판해야 한다

 프랑스  알레르까뮈의 명언을 곱씹어 본다. 우리 역사에서 친일파를 심판하지 않고 또 다시 그들과 그에 동조하는 윤석열과 그 추종세력들, 그리고 국민의힘 의원, 모두에게 내일의 범죄를  예약하는 일은 절대 없어야 하겠다. 그들 모두 심판하여 단죄하여야...