Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Windows 7, Windows 8 (http://quantrinet.com/forum/forumdisplay.php?f=300)
-   -   Windows 7 user profile! (http://quantrinet.com/forum/showthread.php?t=4239)

hoctinhoc 18-11-2009 09:09 AM

Windows 7 user profile!
 

WINDOWS 7 USER PROFILE


Bài viết gồm 3 phần:

1. Tùy biến Default Local User Profile: Cấu hình một user profile theo ý đồ quản trị để làm profile mặc định cho mọi local user.
2. Cấu hình Default Domain User Profile: Cấu hình một user profile theo ý đồ quản trị để làm profile mặc định cho mọi domain user.
3. Cấu hình Mandatory Domain User Profile: Cấu hình profile cho domain user và user không thể điều chỉnh profile. Profile sẽ quay về trạng thái ban đầu sau khi user log off.

1. Tùy biến Default Local User Profile:

Sử dụng 01 máy Windows 7 Ultimate stand-alone có dung lượng ổ đĩa cứng tối thiểu 15.000 MB

a. Cấu hình tập tin thông số cài đặt tự động (unattended setup answer file)

Log on một user thuộc group Administrators, thực hiện một trong hai phương thức sau đây để có được answer file.

Phương thức 1: Copy đoạn code dưới đây và lưu thành tập tin C:\TAM\Unattend.xml

Trích dẫn:



<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>EN-US</UILanguage>
</SetupUILanguage>
<InputLocale>EN-US</InputLocale>
<SystemLocale>EN-US</SystemLocale>
<UILanguage>EN-US</UILanguage>
<UserLocale>EN-US</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComplianceCheck>
<DisplayReport>Never</DisplayReport>
</ComplianceCheck>
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Size>15000</Size>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Extend>false</Extend>
<Format>NTFS</Format>
<Label>Windows</Label>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
<TypeID>1</TypeID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<Key>xxx-xxx-xxx-xxx-xxx</Key>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>Nhat Nghe</FullName>
<Organization>Nhat Nghe</Organization>
</UserData>
<WindowsDeploymentServices>
<Login>
<Credentials>
<Domain>NhatNghe.Local</Domain>
<Password>P@ssword</Password>
<Username>Administrator</Username>
</Credentials>
</Login>
<ImageSelection>
<InstallImage>
<ImageGroup>ImageGroup1</ImageGroup>
<ImageName>Windows 7 ULTIMATE</ImageName>
<Filename>Install.wim</Filename>
</InstallImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</ImageSelection>
</WindowsDeploymentServices>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>MQAyADMAUABhAHMAcwB3AG8AcgBkAA==</Value>
<PlainText>false</PlainText>
</Password>
<DisplayName>NhatNghe</DisplayName>
<Group>Administrators</Group>
<Name>NhatNghe</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>true</CopyProfile>
<RegisteredOrganization>NhatNghe</RegisteredOrganization>
<RegisteredOwner>LeNgocHien</RegisteredOwner>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:d:/sources/install.wim#Windows 7 ENTERPRISE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Phương thức 2
:

Cài đặt Windows AIK v.2 và dùng Windows System Image Manager để tạo tập tin Unattend.xml.
Xin tham khảo tại đây: LEVEL 2 - LAB 4: CÀI ĐẶT WINDOWS 7 TỰ ĐỘNG
Bổ sung thông tin vào Unattend.xml:
- Trong Windows System Image Manager: Click phải x86_Microsoft-Windows-Shell-Setup... > Add Setting to Pass 4 specialize

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 811x447http://hien.nhatnghe.vn/images/W7_Pr...DefProf001.png

- Đường dẫn: 4 specialize > x86_Microsoft-Windows-Shell-Setup_neutral > CopyProfile > chọn giá trị True

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 811x447http://hien.nhatnghe.vn/images/W7_Pr...DefProf002.png

- Lưu answer file: C:\TAM\UnAttend.xml

b. Cấu hình profile mẫu

- Log on một user thuộc group Administrators
- Đổi ảnh nền desktop.
- Trên desktop, tạo 2 thư mục Hoso_01 và HoSo_02

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 1024x768http://hien.nhatnghe.vn/images/W7_Pr...DefProf003.png

c. Cấu hình profile mẫu thành Default User Profile

- Trên command line lần lượt nhập 02 dòng lệnh sau:
cd \windows\system32\sysprep
sysprep /generalize /unattend:\tam\unattend.xml

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 677x198http://hien.nhatnghe.vn/images/W7_Pr...DefProf004.png

- Hộp thoại System Preparation Tool > OK

http://hien.nhatnghe.vn/images/W7_Pr...DefProf006.png

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 1024x768http://hien.nhatnghe.vn/images/W7_Pr...DefProf007.png

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 1024x768http://hien.nhatnghe.vn/images/W7_Pr...DefProf008.png

- Hệ thống tự động restart > Chờ đến khi quá trình unattended setup hoàn tất.

d. Kiểm tra

- Logon username NhatNghe password 123
- Tạo local user u1/123 > logon u1 > profile của u1 được sao nguyên bản từ profile mẫu.

2. Cấu hình Default Domain User Profile:

Kế thừa kết quả phần 1.
Cần dùng thêm 02 máy:
- 01 máy Windows Server 2003 (hoặc Windows Server 2008) đã nâng cấp domain controller. Tạm gọi là DC
- 01 máy Windows 7 gia nhập domain. Tạm gọi là Client 2
Máy Windows7 đã dùng ở phần 1 gia nhập domain. Tạm gọi là Client 1

a. Cấu hình

Tại Client 1 > Log on một user thuộc group Domain Admins

- Start > khung Search and folder options > nhập \\tên máy DC\NETLOGON. ví dụ: \\pc01\NETLOGON

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 1024x768http://hien.nhatnghe.vn/images/W7_Pr...NetProf001.png

- Tạo thư mục có tên chính xác là Default User.v2

http://hien.nhatnghe.vn/images/W7_Pr...etProf001b.png

- Start > Click phải Computer > Properties > Chọn Advanced system settings

http://hien.nhatnghe.vn/images/W7_Pr...NetProf002.png

- Tab Advanced > Phần User Profiles > Settings

http://hien.nhatnghe.vn/images/W7_Pr...NetProf003.png

- Chọn Default Profile > Copy To

http://hien.nhatnghe.vn/images/W7_Pr...NetProf004.png

- Khung Copy profile to > Nhập đường dẫn đến thư mục Default User.v2 đã tạo trên DC. ví dụ: \\pc01\NETLOGON\Default User.v2

http://hien.nhatnghe.vn/images/W7_Pr...NetProf005.png

- Phần Permitted to use > Change

http://hien.nhatnghe.vn/images/W7_Pr...NetProf005.png

- Add Everyone > Check Names > OK

http://hien.nhatnghe.vn/images/W7_Pr...NetProf006.png

- OK

http://hien.nhatnghe.vn/images/W7_Pr...NetProf007.png

- Yes

http://hien.nhatnghe.vn/images/W7_Pr...NetProf008.png

- OK 2 lần

http://hien.nhatnghe.vn/images/W7_Pr...NetProf009.png

http://hien.nhatnghe.vn/images/W7_Pr...NetProf010.png

b. Kiểm tra kết quả

- Tại DC: Tạo user D1 / P@ssword
- Tại Client 2: Logon D1 / P@ssword > Profile của D1 được sao nguyên bản từ profile mẫu.

3. Cấu hình Mandatory Domain User Profile:

Kế thừa kết quả phần 2.

a. Tạo thư mục chứa mandatory profile

- Tại DC: Logon một user thuộc group Domain Admins > tạo thư mục C:\Profiles
- Share thư mục Profiles: Shared name mặc định, Share permission: everyone allow full control
- Tại Client1: Logon một user thuộc group Domain Admins > truy cập DC > trong thư mục Profiles > tạo thư mục đặt tên chính xác là Mandatory.v2

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf001.png

b. Cấu hình mandatory profile

- Tại Client 2: Start > Click phải Computer > Properties > Chọn Advanced system settings

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf002.png

- Tab Advanced > Phần User Profiles > Settings

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf003.png

- Chọn Default Profile > Copy To

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf004.png

- Khung Copy profile to > Nhập đường dẫn đến thư mục Mandatory.v2 đã tạo trên DC. ví dụ: \\pc01\Profiles\Mandatory.v2

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf005.png

- Phần Permitted to use > Change

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf005.png

- Add Everyone > Check Names > OK

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf006.png

- OK

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf007.png

- Yes

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf008.png

- OK 2 lần

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf009.png

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf010.png

- Truy cập thư mục Mandatory.v2 > Chọn Organize > Folder and search options

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 641x503http://hien.nhatnghe.vn/images/W7_Pr...ndaProf011.png

- Trong Folder Options > Tab View:

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf013.png

> Chọn "Show hidden files, folders and drives"
> Bỏ chọn "Hide extension for known file types"
> Bỏ chọn "Hide protected operating systen files (Recommended)"
- Yes

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf012.png

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf013.png

- Trong thư mục Mandatory.v2 > đổi tên tập tin file NTUSER.DAT thành NTUSER.MAN

http://nhatnghe.com/forum/undefined/.../wol_error.gifHình ảnh này đã được thay đổi kích thước. Click vào đây để xem hình ảnh gốc với kích thước là 641x503http://hien.nhatnghe.vn/images/W7_Pr...ndaProf014.png

c. Cấu hình roaming user profile

- Tại DC > Mở properties của user U1 > Khai báo roaming profile. Chú ý tên folder phải là Mandatory (không có .v2) như hình minh họa. ví dụ: \\pc01\Profiles\Mandatory

http://hien.nhatnghe.vn/images/W7_Pr...ndaProf015.png

d. Kiểm tra kết quả

- Tại Client 1 hoặc Client 2: logon U1
- Tạo folder, shortcut tùy ý trên desktop
- Tạo folder, file trong thư mục U1
- Log off
- Log on U1 > Mọi thay đổi của U1 đã bị vô hiệu hóa.

Cảm ơn Quý Vị đã theo dõi bài viết!
__________________
Nhất Nghệ
LÊ NGỌC HIẾN



:battay:

http://quantrinet.com/ads/quantrinet1.png


Bây giờ là 11:24 AM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.