copyprofile dla windows 2000#
 NIestety ale narzędzia copyprofile.exe nie ma dla systemu windows 2000. W związkui z tym używałem skryptu:

rd /q /s "C:\Documents and Settings\risasi\Local Settings\Temp"
rd /q /s "C:\Documents and Settings\risasi\My Documents"
xcopy   "C:\Documents and Settings\risasi" "C:\Documents and Settings\mandatory" /s /E /C /Y /I /H
xcopy   "C:\Documents and Settings\risasi" "C:\Documents and Settings\Default User" /s /E /C /Y /I /H
attrib "c:\Documents and Settings\mandatory\ntuser.pol" -h -s
del "c:\Documents and Settings\mandatory\ntuser.pol"
attrib "c:\Documents and Settings\Default User\ntuser.pol" -h -s
del "c:\Documents and Settings\Default User\ntuser.pol"
echo y| cacls "C:\Documents and Settings\mandatory" /t /e /g everyone:r
echo y| cacls "C:\Documents and Settings\Default User" /t /e /g everyone:r
attrib -H "C:\Documents and Settings\mandatory\NTUSER.DAT"
ren "C:\Documents and Settings\mandatory\NTUSER.DAT" "NTUSER.MAN"
attrib +H "C:\Documents and Settings\mandatory\NTUSER.MAN"
rd /q /s "C:\Documents and Settings\risasi"

Gdzie risasi jest użytkownikiem z którego są tworzone profile mandatoryjny i Default User.

O ile z profilem Default User nie ma żadnego problemu, to profil madatroyjny się wykrzacza - powód - brak dostępu do kluczy rejestru.
Aby to zmienić trzeba zmienić w użytkowniku risasi ACL do kluczu rejestru HKCU. Jeśli to zrobimy, poolisy będą aplikowane dla danego profilu, ale niestety nie dla Explorera (tzn. takie polisy jak skrypty logon\logoff zabronienie regedita, cpl; ale już nie active desktop czy modyfikacje desktopu/menu start).


Aby polisy były w pełni aplikowane dla danego profilu, musimy jeszcze zmienić acl dla następujących kluczy rejestru:

HKCU\Software\policies
HKCU\Software\Microsoft\Windows\Current Version\Group Policy

Do zmiany acl można użyć subinacl.exe z W2kResKit. Odpowiedni skrypcik wygląda następująco:

subinacl /subkeyreg HKEY_CURRENT_USER /replace=PJWSTK\risasi=Everyone
subinacl /subkeyreg HKEY_CURRENT_USER\Software\Policies /replace=PJWSTK\risasi=Everyone
subinacl /subkeyreg "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy" /replace=PJWSTK\risasi=Everyone


Thursday, September 08, 2005 2:27:42 PM (Central European Standard Time, UTC+01:00) #    Comments [0]  |  Trackback

 

All content © 2010, Krzysztof Pietrzak
On this page
This site
Calendar
<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
Archives
Sitemap
Blogroll OPML
  Tokyo by night
blog WiTa
  W-Files
blog n€x¤Ra
 .:fotoblog:.
blog Kfaza
 \\archon\blog$
blog archona
 Czasowstrzymywacz
Blog Fookyego
 Jog Pstryka
Jog Pstryka
 Mac OS X vs. Active Directory
techniczny blog kfaza

Maps
Locations of visitors to this page