Machine microsoft windows nt secedit gpttmpl inf

when i configure group policy in security settings, i get an error message saying "the system cannot find the file specified.Failed to save \domain.comsysvoldoamin.comPolicies{31B2F340-016D-11D2-945F-00C04FB984F9}MachineMicrosoftWindows NTSecEditGptTmpl.inf". I am able to see GptTmpl.inf file in that respective path.
  • Remove From My Forums
  • Question

  • when i configure group policy in security settings, i get an error message saying «the system cannot find the file specified.Failed to save \domain.comsysvoldoamin.comPolicies{31B2F340-016D-11D2-945F-00C04FB984F9}MachineMicrosoftWindows NTSecEditGptTmpl.inf«.
    I am able to see GptTmpl.inf file in that respective path.

     i tried to repair the GPO and ran dcgpofix /ignoreschema /target:both it says » the specified path is not found» I am using Windows 2003 std, 32 bit.

    Can anyone help me in this issue.

Answers

  • Hello Soudami,

    According to your MPS reports, I found a lot of errors regarding DNS as following information.

    ====================================================================
    [WARNING] The DNS entries for this DC are not registered correctly on DNS server ‘4.2.2.2’. Please wait for 30 minutes for DNS server replication.
    [WARNING] The net card ‘HP NC382i DP Multifunction Gigabit Server Adapter #2’ may not be working.
    [WARNING] Cannot find a primary authoritative DNS server for the name ‘XXX.com.’. [ERROR_TIMEOUT]

    Query for DC DNS entry _ldap._tcp.Default-First-Site-Name._sites.XXX.com. on DNS server 4.2.2.2 failed.
    DNS Error code: DNS_ERROR_RCODE_NAME_ERROR (Name does not exist on DNS server)
    ====================================================================

    I think the 4.2.2.2 external (public) DNS addresses are causing the problem. The following kB can tell you why using a public DNS server for AD doesn’t work. You can try to remove the public DNS servers from vaepldc and configure it
    as FORWARDERS on the DNS server properties in the DNS management console. After changing the ip settings run ipconfig /flushdns and ipconfig /registerdns and restart the netlogon service or reboot the servers.

    Active Directory and Its Reliance on DNS, and using an ISP’s DNS address
    http://msmvps.com/blogs/acefekay/archive/2009/08/17/ad-and-its-reliance-on-dns.aspx

    Also, I found HP NC382i Adapter #2 was unable to gain IP address, what is the Adapter #2 used for? If it’s no use it, disable all of idle adapters.

    Brent


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

    • Marked as answer by

      Monday, October 18, 2010 4:35 AM

Proxy n1nja


  • #2

Можно пойти твоим путем, а можно использовать утилиту LGPO.EXE которая входит в набор утилит от

Ссылка скрыта от гостей

.
Для того что бы сделать резервную копию групповой политики нужно будет воспользоваться командой, от имени администратора системы:

Код:

lgpo.exe /b {путь куда сохранить бекап} /n {имя ГП под которым сохранить, может отличаться от имени копируемой политики, если в имени бут пробелы, нужно использовать ковычки}

В каталоге который ты укажешь создастся папка с именем GUID твоих настроек.

Screenshot_1.png

Для того что бы привести забекапленые настройки реестра для ГП в файле резервной копии, из файла registry.pol в удобно для чтения вида, необходимо будет выполнить команду:

Код:

lgpo.exe /parse /m "{путь дл файла с бекапом}{GUID}DomainSysvolGPOMachineregistry.pol">>{путь куда сохранить файл для анализа}

Screenshot_3.png

Как видишь тут отображаются все настройки реестра, которые применяются данной политикой.
Далее ты можешь внести необходимые изменения в политику, а затем сконвертировать его в файл *.pol командой

Код:

lgpo.exe /r "{путь дл txt файла}" /w "{путь куда сохранить pol файл}.pol"

Для того что бы применить изменненые политики на ЭТОМ же компьютере необходимо воспользоваться командой:

Код:

lgpo.exe /m "{путь до нового pol файла}.pol"

А для того что бы применить политики на ДРУГОМ компьютере требуется воспользоваться вот такой командой:

Код:

lgpo.exe /g {Путь где лежит папка GUID}

Или есть другой вариант, при помощи скриптов. Код писал не я.
Скрипт для бекапа груповой политики:

Visual Basic:

If WScript.Arguments.length =0 Then
         
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1

Else
Set oShell = WScript.CreateObject ("WScript.Shell")

oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%System32GroupPolicyMachine %userprofile%DesktopLocal-Group-Policy-BackupMachine"),0

oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%System32GroupPolicyUser %userprofile%DesktopLocal-Group-Policy-BackupUser"),0

oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%System32GroupPolicyUsers %userprofile%DesktopLocal-Group-Policy-BackupGroupPolicyUsers"),0

End If

Он создаст на рабочем столе папку с ГП.
А вот код для того что бы восстановиться из бекапов:

Visual Basic:

If WScript.Arguments.length =0 Then
         
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1

Else
Set oShell = WScript.CreateObject ("WScript.Shell")

oShell.run ("cmd.exe /c RD /S /Q %SystemRoot%System32GroupPolicyMachine"),0

oShell.run ("cmd.exe /c RD /S /Q %SystemRoot%System32GroupPolicyUser"),0

oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %userprofile%DesktopLocal-Group-Policy-BackupMachine %SystemRoot%System32GroupPolicyMachine"),0

oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %userprofile%DesktopLocal-Group-Policy-BackupUser %SystemRoot%System32GroupPolicyUser"),0

oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %userprofile%DesktopLocal-Group-Policy-BackupGroupPolicyUsers %SystemRoot%System32GroupPolicyUsers"),0

WScript.Sleep 2000

oShell.run "cmd.exe /k gpupdate /force"

End If

Обрати внимание на пути в какие первый скрипт сохраняет, и из каких второй восстанавливает.
Собственно переписать этот скрипт под батник думаю большого труда не составит.

Последнее редактирование: 01.08.2020

~localhost


  • #3

Бьюсь сэтой утилитой LGPO не могу перевести в txt.

1596289545804.png

Proxy n1nja


  • #4

Бьюсь сэтой утилитой LGPO не могу перевести в txt.
Посмотреть вложение 42824

Консоль от имени администратора запущена ?
Провал ли складывать бекапы в директорию не имеющих кириллических символов ?
Бекапиться без ошибок ? Сам бекап потом применить можешь ? ВБС скрипты пробовал ? Ну и для полноты понимания происходящего, какие там политики пременены ? Какая это ос конкретно ? И не пробовал ли запускать не через пош а именно цмд ?

~localhost


  • #5

Консоль от имени администратора запущена ?
Провал ли складывать бекапы в директорию не имеющих кириллических символов ?
Бекапиться без ошибок ? Сам бекап потом применить можешь ? ВБС скрипты пробовал ? Ну и для полноты понимания происходящего, какие там политики пременены ? Какая это ос конкретно ? И не пробовал ли запускать не через пош а именно цмд ?

Запускаю от админа в CMD
Кириллицу исключал.

1596292040771.png

1596292170421.png

Изменил политику на блокировку учетной записи

1596292203569.png

Proxy n1nja


  • #6

Запускаю от админа в CMD
Кириллицу исключал.
Посмотреть вложение 42825
Посмотреть вложение 42826
Изменил политику на блокировку учетной записи
Посмотреть вложение 42827

Так господи, придется немного тебе объяснить.
Видимо в первом посте описал немного сумбурно и не полностью. В *.pol содержится все настройки реестра, которые применяются данной политикой. В файле DomainSysvolGPOMachinemicrosoftwindows ntSecEditGptTmpl.inf шаблон твоих настроек (и то что ты на скрине посмотреть пытался)
В файле DomainSysvolGPOMachinemicrosoftwindows ntAuditaudit.csv все настройки в виде таблицы вида:

Имя компьютера цель политики подкатегория GUID подкатегории параметр включения параметр исключения значение параметра

Судя по всему у тебя нормально там все забекапилось.
Ищи свои настройки в GptTmpl.inf
Ну и иногда включай «любопытство» и немного логики, не в обиду :)

~localhost


  • #7

Так господи, придется немного тебе объяснить.
Видимо в первом посте описал немного сумбурно и не полностью. В *.pol содержится все настройки реестра, которые применяются данной политикой. В файле DomainSysvolGPOMachinemicrosoftwindows ntSecEditGptTmpl.inf шаблон твоих настроек (и то что ты на скрине посмотреть пытался)
В файле DomainSysvolGPOMachinemicrosoftwindows ntAuditaudit.csv все настройки в виде таблицы вида:

Имя компьютера цель политики подкатегория GUID подкатегории параметр включения параметр исключения значение параметра

Судя по всему у тебя нормально там все забекапилось.
Ищи свои настройки в GptTmpl.inf
Ну и иногда включай «любопытство» и немного логики, не в обиду :)

Это я понял.
» содержится все настройки реестра, которые применяются данной политикой » — то есть есть политики которые не меняют не чего в реестре? и соотвественно у меня него в txt и не залетело?

Proxy n1nja


  • #8

Это я понял.
» содержится все настройки реестра, которые применяются данной политикой » — то есть есть политики которые не меняют не чего в реестре? и соотвественно у меня него в txt и не залетело?

Верно.

~localhost


  • #9

Ок Спасибо.
Тогда мой вариант делать бэкап, менять строки в файле .ini. и назад грузить его с помощью ключа /s.

Proxy n1nja


  • #10

Ок Спасибо.
Тогда мой вариант делать бэкап, менять строки в файле .ini. и назад грузить его с помощью ключа /s.

Да. Вот смотри, я делаю бекап с вот такой конфигурацией политикой блокировки учетных записей пользователей:

Screenshot_4.png

Далее редактирую GptTmpl.INF файл например таким образом:

Screenshot_5.png

Далее разворачиваем эти настройки из редактированого файла командой:

Bash:

lgpo.exe /G {путь до нашей папки с GUID именем}

Screenshot_6.png

И получаем вот такой результат:

Screenshot_7.png

Как видишь все отработало как и было задумано.
Осталися ли твой вопрос не решенным ?

~localhost


  • #11

Да. Вот смотри, я делаю бекап с вот такой конфигурацией политикой блокировки учетных записей пользователей:
Посмотреть вложение 42829
Далее редактирую GptTmpl.INF файл например таким образом:
Посмотреть вложение 42833
Далее разворачиваем эти настройки из редактированого файла командой:

Bash:

lgpo.exe /G {путь до нашей папки с GUID именем}

Посмотреть вложение 42831
И получаем вот такой результат:
Посмотреть вложение 42832
Как видишь все отработало как и было задумано.
Осталися ли твой вопрос не решенным ?

С прогой этой то да. ищу список всех строк которые можно написать в данный файл ini ))

Proxy n1nja


  • #12

С прогой этой то да. ищу список всех строк которые можно написать в данный файл ini ))

В каком смысле список всех строк ? В самом .INF файле разве не и так, «список всех строк» ?

~localhost


  • #13

В каком смысле список всех строк ? В самом .INF файле разве не и так, «список всех строк» ?

Там список политик которые на данном компе установлены. Если сделать изменения и выгрузить еще раз появиться дополнительная строка.

Proxy n1nja


  • #14

Там список политик которые на данном компе установлены. Если сделать изменения и выгрузить еще раз появиться дополнительная строка.

Может быть, не занимался тем что бы сравнивать разные выгруженные политики ибо это не имеет смысла. Но как вариант, если тебе зачем-то и очень уж нужно, можешь поастраивать все что можно и для себя потом все это задокументировать. А так, описание структуры этого файла не встречал, по крайней мере microsoft это не документировал.

Закрывай топик, надоел уже :D проблему с переносом и изменением решили же. :D

~localhost


  • #15

Может быть, не занимался тем что бы сравнивать разные выгруженные политики ибо это не имеет смысла. Но как вариант, если тебе зачем-то и очень уж нужно, можешь поастраивать все что можно и для себя потом все это задокументировать. А так, описание структуры этого файла не встречал, по крайней мере microsoft это не документировал.

Закрывай топик, надоел уже :D проблему с переносом и изменением решили же. :D

я так и сделал. Просто думаю если найду список, сделаю универсальное решение.
Все Спс.))))

What are Restricted Groups?

The Restricted Groups security setting in Group Policy allows an administrator to define two properties for security-sensitive groups (“restricted” groups). The two properties are Members and Member Of. In short it lets an Administrator decide which security principals are members of a restricted group, and which groups the restricted group is a member of. The Restricted Groups security setting can be found under Computer ConfigurationWindows SettingsSecurity SettingsRestricted Groups in any Domain based GPO. The Members section enforces the membership of a group. Any existing members of the restricted group are removed and only the security principals listed in the Members section are members of the restricted group. Conversely, the Member Of section simply ensures that the restricted group is added to the groups listed in Member Of. It does not remove the group from other groups of which it is a member. This means that if you use the Members section; only the security principals you select will be members of a restricted group, all existing members of the group will be removed. If you use the Member Ofsection your group is only added to the restricted group.

Let’s say you want to add the domain group Domain Users to the local Administrators group on a set of computers. With Restricted Groups there are two approaches; using the Members section or using the Member Ofsection. In the first case, the restricted group is Administrators, and we add Domain Users as a member.

052508_2246_Workingwith1

Figure 1: Using the Members section of Restricted Groups

When using the Memberssection like this, all existing members of the Administrators group will be removed for all computers where this policy is applied.

In the second case the Restricted Group is Domain Users, and we specify that it should be a member of Administrators.

052508_2246_Workingwith2

Figure 2: Using the Member Of section of restricted Groups

When using the Member Ofsection like this, the existing membership of the Administrators group is preserved and Domain Users is simply added on all computers where this policy is applied.

In either case your policy should be linked to an OU where the computers on which you want the policy applied are located.

GptTmpl.inf

The Restricted Groups information, along with every other setting under the Security Settings container in a GPO, is stored in an INF file called GptTmpl.inf. Each GPO with security settings has one GptTmpl.inf file and its path is always:

%systemroot%SYSVOLsysvol<DNS domain name>Policies<GUID of GPO>MachineMicrosoftWindows NTSecEditGptTmpl.inf

The section where the Restricted Groups info is stored is called Group Membership.

[Unicode]
Unicode=yes
[Version]
signature=”$CHICAGO$”
Revision=1
[Group Membership]
*S-1-5-21-12345678-123456789-123456789-513__Memberof = *S-1-5-32-544
*S-1-5-21-12345678-123456789-123456789-513__Members =
*S-1-5-32-544__Memberof =
*S-1-5-32-544__Members = *S-1-5-21-12345678-123456789-123456789-513

Figure 3: Example GptTmpl.inf file

Notice that all the groups we selected in the interface have been resolved to SIDs and that those SIDs are prepended with an asterisk (*) character. This is important as we will see later.

Group Names and SIDs in Restricted Groups (to resolve, or not to resolve)

The problem with the Restricted Groups interface is that it allows you to either browse for a group name or enter one manually. It is very important to understand what happens in each case. If you browse; the SID of the group you selected will end up in the INF file in the policy. If you enter a name manually; the name ends up in the INF file.

[Unicode]
Unicode=yes
[Version]
signature=”$CHICAGO$”
Revision=1
[Group Membership]
*S-1-5-21-12345678-123456789-123456789-513__Memberof = Another Example Group,*S-1-5-32-544
*S-1-5-21-12345678-123456789-123456789-513__Members =
Manually Entered Group Name__Memberof =
Manually Entered Group Name__Members = *S-1-5-21-12345678-123456789-123456789-513,Another Example Group

Figure 4: Example GptTmpl.inf file demonstrating the difference between entering names manually and browsing

I this example GptTmpl.inf file we see this difference clearly. The group *S-1-5-21-12345678-123456789-123456789-513 (Domain Users) is resolved and has therefore been browsed for. Of its members one, Another Example Group, has been entered manually and the other, *S-1-5-32-544, has been browsed for. The group Manually Entered Group Name has been manually entered and of its members, one has been browsed for, *S-1-5-21-12345678-123456789-123456789-513, and the other, Another Example Group, has been manually entered.

Manually entered names, of either groups or users, are only valid if the computer applying the policy can resolve them. If you want to control the membership of the local Administrators group on computers and enter the name Administrators manually into the Restricted Groups interface; your policy will only work on computers where the local Administrators group is named exactly Administrators (not case-sensitive). Meaning that if the computer applying the policy is running a localized version of Windows, the policy will fail, because the Administrators group is not named Administrators, but has had its name translated into whatever language is running on the computer. In this scenario it is better to use well-known SIDs in Restricted Groups to guarantee that the policy works on all versions of Windows.

What are well-known SIDs and how to make sure you use them correctly in Restricted Groups?

A security identifier (SID) is a unique value of variable length that is used to identify a security principal or security group in Windows operating systems. Well-known SIDs are a group of SIDs that identify generic users or generic groups. Their values remain constant across all operating systems. A list of all well-known SIDs is available here:

Well-known security identifiers in Windows operating systems
http://support.microsoft.com/kb/243330

If you want to use a well-known SID in a Restricted Groups policy you must edit the policy on a machine that has access to that group and use the browse button to select it. As we have seen, browsing for a group guarantees that it is resolved to its actual SID, but to be able to browse for a group we must be on a machine that can see that group. Fortunately this is not a hard requirement to meet. For example, the SIDs of all default groups that exist both on domain member machines and on domain controllers, are the same. The SID of the local Administrators group and the Administrators group in an Active Directory domain is the same (S-1-5-32-544). The problem emerges when you edit the policy on a machine that can’t browse to the group you want. E.g. if you want to control the membership of the Power Users group on Windows workstations and you are editing the policy from a domain controller (which does not have a Power Users group). If you find yourself in this situation and decide to manually enter the name of the group; that policy will only work on machines where the local Security Accounts Manager (SAM) database contains a group with the exact same name you entered.

If you apply the policy to a machine with a localized version of Windows your policy will fail and the winlogon.log (%windir%securitylogswinlogon.log) will report error 1332 (0x534) No mapping between account names and security IDs was done. This happens because the groups on that machine have names in the language of the version of Windows it is running. E.g. a German version of Windows XP will not have a local group named Administrators; instead it will be called Administratoren.

To work around this you can edit the policy on a machine that can browse to the group you want. Or you can manually edit the GptTmpl.inf file and add the well-known SID of the group you want. Follow the syntax in the examples above and remember the asterisk. You do not have to enter the members or which other groups that group should be a member of. You can do that in the Restricted Groups interface later. Any members you choose to enter can be either SIDs or group or user names (or computer names). They must be comma separated and groups containing spaces do not require brackets (“).

After the well-known SID is present in the policy you can edit it anywhere you like, but note that if that group is not present on the machine you are editing on; only the SID will be displayed. The policy works regardless.

052508_2246_Workingwith3

Figure 5: Editing a group that is not resolvable on the local machine (in this case Power Users on a Domain Controller)

So what about entering the SIDs directly into the Restricted Groups interface? That would be nice so we don’t have to edit the GptTmpl.inf file or get another machine to edit the policy on.

Remember that Windows is built so that whenever you want to enter a raw SID it has to be preceded by an asterisk character (*). Trying to enter that in the restricted Groups interface fails.

052508_2246_Workingwith4

Figure 6: Trying to enter a raw SID in the Restricted Groups interface

So your only option is editing GptTmpl.inf or editing the policy on a machine where you can browse to the group.

Importing

If you already have a nice security template (inf) file ready with the SIDs and membership information you want ready, you can import it directly into a policy. Any settings you have in the template that are already present in the policy will be overwritten.

052508_2246_Workingwith5

Figure 7: Importing a template into a policy

This feature is very handy if you have groups with large membership lists and do not fancy adding them all manually again. Also, every other setting under the Security Settings container can be stored in security templates (inf), so they can be easily moved between servers and domains. Notice also that the Export policy option is grayed out on all domain based GPOs. It is, however, available when editing a local GPO. You can also use the Security Configuration and Analysis snap-in to create a security policy, export it, and then import it into a domain based GPO.

Понравилась статья? Поделить с друзьями:
  • Machine check exception синий экран windows 10 что делать
  • Machine check exception windows 10 что это
  • Machine check exception windows 10 при установке виндовс
  • Machine check exception windows 10 при загрузке
  • Machine check exception windows 10 после установки