Microsoft MVP성태의 닷넷 이야기
오류 유형: 126. Windows failed to apply the Group Policy Folder Options settings. [링크 복사], [링크+제목 복사],
조회: 18008
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

Windows failed to apply the Group Policy Folder Options settings.




약 1시간 30분 ~ 2시간 간격으로 다음의 오류가 System 로그에 쌓이는 현상이 발생했습니다.

Log Name:      System
Source:        Microsoft-Windows-GroupPolicy
Date:          2011-05-16 오전 11:41:38
Event ID:      1085
Task Category: None
Level:         Warning
Keywords:      
User:          TESTAD\SeongTae Jeong
Computer:      win2008x86.testad.com
Description:
Windows failed to apply the Group Policy Folder Options settings. Group Policy Folder Options settings might have its own log file. Please click on the "More information" link.

마치 그것만 있으면 어떻게 알 수 있겠냐는 듯이, 부가적으로 다음과 같은 오류도 약 1시간 30분 ~ 2시간 간격으로 Application 로그에 쌓였습니다.

Log Name:      Application
Source:        Group Policy Folder Options
Date:          2011-05-16 오전 9:33:59
Event ID:      8194
Task Category: (2)
Level:         Error
Keywords:      Classic
User:          SYSTEM
Computer:      win2008x86.testad.com
Description:
The client-side extension could not remove user policy settings for 'Default Domain Policy {31B2F340-016D-11D2-945F-00C04FB984F9}' because it failed with error code '0x8007000d The data is invalid.' See trace file for more details.

검색해 보니 다음의 글이 나오는데,

Event ID 1085 - Application of Group Policy
; https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc727303(v=ws.10)

이에 따라 테스트 삼아서 gpupdate.exe를 실행하니 아래와 같은 결과가 나옵니다.

C:\Windows\system32>gpupdate
Updating Policy...

User Policy update has completed successfully.

The following warnings were encountered during user policy processing:

Windows failed to apply the Group Policy Folder Options settings. Group Policy Folder Options settings might have its own log file. Please click on the "More in
formation" link.
Computer Policy update has completed successfully.

For more detailed information, review the event log or invoke gpmc.msc to access information about Group Policy results.

비록 해결책은 아니지만, gpupdate 실행으로 위에서 열거했던 2가지 이벤트 로그 오류가 정확하게 재현이 되는 것을 확인했습니다. 절반은 성공했군요. ^^

좀 더 검색하니, 해결책이 나오는데요.

Error message on a domain controller that is running Windows Server 2008: "The client-side extension could not remove user policy settings for 'Domain Name {GUID}' because it failed with error code '0x8007000d The data is invalid.'"
; http://support.microsoft.com/kb/977564/en-us

캐시 파일이 깨져서 발생한다고 합니다. 이 때문에, 깨진 캐시 파일을 지워야 하는데 그 파일의 경로를 알기 위해서는 Group Policy에 대한 로그를 남기도록 설정을 해줘야 한다고 하는데, 이 방법에 대해서는 다음의 글에서 자세하게 설명해 주고 있습니다.

Enabling Group Policy Preferences Debug Logging using the RSAT
; https://docs.microsoft.com/en-us/archive/blogs/askds/enabling-group-policy-preferences-debug-logging-using-the-rsat

따라서, gpedit.msc를 실행하고 "Computer Configuration\Policies\Administrative Templates\System\Group Policy\Logging and tracing"으로 이동한 후, 이제 이전에 발생했던 이벤트 로그 항목에서 보았던 것("Group Policy Folder Options settings")처럼 다양한 "Logging and tracing" 항목들 중에서 "Folder Options Policy Processing"을 선택하여 로그가 남도록 설정합니다.

evt_8194_1.png

그다음 gpupdate를 다시 실행시키면 (Windows Server 2008의 경우) C:\ProgramData\GroupPolicy\Preference\Trace 경로에 로그 파일이 남습니다. 제 경우에는 User.log 파일 하나가 생성되었는데요. 다음과 같은 내용을 포함하고 있었습니다.

2011-05-16 12:02:45.549 [pid=0x404,tid=0xbf0] Entering ProcessGroupPolicyExFolderOptions()
2011-05-16 12:02:45.549 [pid=0x404,tid=0x180c] SOFTWARE\Policies\Microsoft\Windows\Group Policy\{A3F3E39B-5D83-4940-B954-28315B82F0A8}
2011-05-16 12:02:45.549 [pid=0x404,tid=0x180c] BackgroundPriorityLevel ( 0 )
2011-05-16 12:02:45.549 [pid=0x404,tid=0x180c] DisableRSoP ( 0 )
2011-05-16 12:02:45.549 [pid=0x404,tid=0x180c] LogLevel ( 2 )
2011-05-16 12:02:45.549 [pid=0x404,tid=0x180c] Command subsystem initialized. [SUCCEEDED(S_FALSE)]
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] Background priority set to 0 (Idle).
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] ----- Parameters
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] CSE GUID : {A3F3E39B-5D83-4940-B954-28315B82F0A8}
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] Flags : (   ) GPO_INFO_FLAG_MACHINE - Apply machine policy rather than user policy
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         ( X ) GPO_INFO_FLAG_BACKGROUND - Background refresh of policy (ok to do slow stuff)
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_SLOWLINK - Policy is being applied across a slow link
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_VERBOSE - Verbose output to the eventlog
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_NOCHANGES - No changes were detected to the Group Policy Objects
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_LINKTRANSITION - A change in link speed was detected between previous policy application and current policy application
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_LOGRSOP_TRANSITION - A change in RSoP logging was detected between the application of the previous policy and the application of the current policy.
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_FORCED_REFRESH - Forced Refresh is being applied. redo policies.
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_SAFEMODE_BOOT - windows safe mode boot flag
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c]         (   ) GPO_INFO_FLAG_ASYNC_FOREGROUND - Asynchronous foreground refresh of policy
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] Token (computer or user SID): S-1-5-21-1990051354-560935109-2448667075-1104
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] Abort Flag : Yes (0x00423f38)
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] HKey Root : Yes (0x000001e0)
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] Deleted GPO List : No
2011-05-16 12:02:45.580 [pid=0x404,tid=0x180c] Changed GPO List : Yes
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Asynchronous Processing : Yes
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Status Callback : No (0x00000000)
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] WMI namespace : Yes (0x01f8309c)
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] RSoP Status : Yes (0x011cfcd8)
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Planning Mode Site : (none)
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Computer Target : No (0x00000000)
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] User Target : No (0x00000000)
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Calculated list relevance. [SUCCEEDED(S_FALSE)]
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] ----- Changed - 0
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Options : (   ) GPO_FLAG_DISABLE - This GPO is disabled.
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c]           ( X ) GPO_FLAG_FORCE - Do not override the settings in this GPO with settings in a subsequent GPO.
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Options (raw) : 0x00000002
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] Version : 983055 (0x000f000f)
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] GPC : LDAP://CN=User,CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=testad,DC=com
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] GPT : \\testad.com\sysvol\testad.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\User
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] GPO Display Name : Default Domain Policy
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] GPO Name : {31B2F340-016D-11D2-945F-00C04FB984F9}
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c] GPO Link : (   ) GPLinkUnknown - No link information is available.
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c]            (   ) GPLinkMachine - The GPO is linked to a computer (local or remote).
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c]            (   ) GPLinkSite - The GPO is linked to a site.
2011-05-16 12:02:45.596 [pid=0x404,tid=0x180c]            ( X ) GPLinkDomain - The GPO is linked to a domain.
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c]            (   ) GPLinkOrganizationalUnit - The GPO is linked to an organizational unit.
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c]            (   ) GP Link Error
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] lParam : 0x00000000
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] Prev GPO : No
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] Next GPO : No
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] Extensions : [{00000000-0000-0000-0000-000000000000}{3BFAE46A-7F3A-467B-8CEA-6AA34DC71F53}][{25537BA6-77A8-11D2-9B6C-0000F8080861}{88E729D6-BDC1-11D1-BD2A-00C04FB9603F}][{35378EAC-683F-11D2-A89A-00C04FBBCFA2}{D02B1F73-3407-48AE-BA88-E8213C6761F1}][{A3F3E39B-5D83-4940-B954-28315B82F0A8}{3BFAE46A-7F3A-467B-8CEA-6AA34DC71F53}]
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] lParam2 : 0x027b08b4
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] Link : LDAP://DC=testad,DC=com
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] GPH : C:\ProgramData\Microsoft\Group Policy\History\{31B2F340-016D-11D2-945F-00C04FB984F9}\S-1-5-21-1990051354-560935109-2448667075-1104\Preferences\FolderOptions\FolderOptions.xml
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] GPT : \\testad.com\sysvol\testad.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\User\Preferences\FolderOptions\FolderOptions.xml
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] GPH data file : C:\ProgramData\Microsoft\Group Policy\History\{31B2F340-016D-11D2-945F-00C04FB984F9}\S-1-5-21-1990051354-560935109-2448667075-1104\Preferences\FolderOptions\FolderOptions.xml
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] Completed parse of GPH XML. [ hr = 0x8007000d "The data is invalid." ]
2011-05-16 12:02:45.611 [pid=0x404,tid=0x180c] Completed remove GPH. [ hr = 0x8007000d "The data is invalid." ]
2011-05-16 12:02:45.611 [pid=0x404,tid=0xbf0] Leaving ProcessGroupPolicyExFolderOptions() returned 0x8007000d

보는 바와 같이 "0x8007000d" 오류가 남는 근처에 GPH data file의 경로가 남습니다.

C:\ProgramData\Microsoft\Group Policy\History\{31B2F340-016D-11D2-945F-00C04FB984F9}\S-1-5-21-1990051354-560935109-2448667075-1104\Preferences\FolderOptions\FolderOptions.xml


이제 끝이 보이는군요. ^^ "FolderOptions.xml" 파일을 삭제하고, 다시 gpupdate를 실행하면 이번에는 정상적으로 다음과 같이 실행되는 것을 확인할 수 있습니다.

C:\Windows\system32>gpupdate
Updating Policy...

User Policy update has completed successfully.
Computer Policy update has completed successfully.

물론, 이벤트 로그의 경고 및 에러 항목은 없어졌습니다.






[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 7/18/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 



2021-10-08 02시21분
SharpGPOAbuse
; https://www.libhunt.com/r/SharpGPOAbuse

SharpGPOAbuse is a .NET application written in C# that can be used to take advantage of a user's edit rights on a Group Policy Object (GPO) in order to compromise the objects that are controlled by that GPO.
정성태

[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13624정성태5/12/2024443Phone: 14. C# - MAUI에서 MediaElement 사용파일 다운로드1
13623정성태5/11/2024491닷넷: 2261. C# - 구글 OAuth의 JWT (JSON Web Tokens) 해석파일 다운로드1
13622정성태5/10/2024484닷넷: 2260. C# - Google 로그인 연동 (ASP.NET 예제)파일 다운로드1
13621정성태5/10/2024501오류 유형: 902. IISExpress - Failed to register URL "..." for site "..." application "/". Error description: Cannot create a file when that file already exists. (0x800700b7)
13620정성태5/9/2024675VS.NET IDE: 190. Visual Studio가 node.exe를 경유해 Edge.exe를 띄우는 경우
13619정성태5/7/2024761닷넷: 2259. C# - decimal 저장소의 비트 구조파일 다운로드1
13618정성태5/6/2024901닷넷: 2258. C# - double (배정도 실수) 저장소의 비트 구조파일 다운로드1
13617정성태5/5/2024988닷넷: 2257. C# - float (단정도 실수) 저장소의 비트 구조파일 다운로드1
13616정성태5/3/2024965닷넷: 2256. ASP.NET Core 웹 사이트의 HTTP/HTTPS + Dual mode Socket (IPv4/IPv6) 지원 방법파일 다운로드1
13615정성태5/3/2024928닷넷: 2255. C# 배열을 Numpy ndarray 배열과 상호 변환
13614정성태5/2/2024854닷넷: 2254. C# - COM 인터페이스의 상속 시 중복으로 메서드를 선언
13613정성태5/1/2024888닷넷: 2253. C# - Video Capture 장치(Camera) 열거 및 지원 포맷 조회파일 다운로드1
13612정성태4/30/2024911오류 유형: 902. Visual Studio - error MSB3021: Unable to copy file
13611정성태4/29/2024924닷넷: 2252. C# - GUID 타입 전용의 UnmanagedType.LPStruct - 두 번째 이야기파일 다운로드1
13610정성태4/28/2024993닷넷: 2251. C# - 제네릭 인자를 가진 타입을 생성하는 방법 - 두 번째 이야기
13609정성태4/27/20241030닷넷: 2250. PInvoke 호출 시 참조 타입(class)을 마샬링하는 [IN], [OUT] 특성파일 다운로드1
13608정성태4/26/20241105닷넷: 2249. C# - 부모의 필드/프로퍼티에 대해 서로 다른 자식 클래스 간에 Reflection 접근이 동작할까요?파일 다운로드1
13607정성태4/25/20241109닷넷: 2248. C# - 인터페이스 타입의 다중 포인터를 인자로 갖는 C/C++ 함수 연동
13606정성태4/24/20241068닷넷: 2247. C# - tensorflow 연동 (MNIST 예제)파일 다운로드1
13605정성태4/23/20241070닷넷: 2246. C# - Python.NET을 이용한 파이썬 소스코드 연동파일 다운로드1
13604정성태4/22/20241058오류 유형: 901. Visual Studio - Unable to set the next statement. Set next statement cannot be used in '[Exception]' call stack frames.
13603정성태4/21/20241127닷넷: 2245. C# - IronPython을 이용한 파이썬 소스코드 연동파일 다운로드1
13602정성태4/20/20241065닷넷: 2244. C# - PCM 오디오 데이터를 연속(Streaming) 재생 (Windows Multimedia)파일 다운로드1
13601정성태4/19/20241088닷넷: 2243. C# - PCM 사운드 재생(NAudio)파일 다운로드1
13600정성태4/18/20241143닷넷: 2242. C# - 관리 스레드와 비관리 스레드
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...