Showing posts with label Windows Server. Show all posts
Showing posts with label Windows Server. Show all posts

September 27, 2016

GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group Policy

Create a new Group Policy Object and browse to 
User Settings -> Polices -> Administrative Templates -> Windows Components -> Internet Explorer -> Internet Control Panel -> Security Page.




Double click on the Site to Zone Assignment List, select enable and choose show to configure the options.

Note the numbering of the Security Zones:
1 for Local Intranet, 
2 for Trusted Sites, 
3 for Internet Zone 
4 for Restricted Sites Zone.

In this example I have added http://****.us to the Local intranet (1) and http://****.com to the Trusted sites (2).


clicking OK

You can run gpupdate /force to update GPO

Test on client,



Enjoyed!




September 22, 2016

GPO - How To Configure Legal Notices On Domain Computers Using Group Policy

How To Configure Legal Notices On Domain Computers Using Group Policy – Few years ago when i was working on Windows Server 2008 R2, I was told by my manager to configure a logon banner. What came to my mind was to write a script for it and run the script at logon. There are 2 ways to configure legal notices on domain computers, you can configure it by writing a script and executing it at the logon or configuring legal notice using a group policy. I believe the second method is very easy. You can configure Windows Server to display a message to users when they log on. You can use the message display functionality to personalize the logon process, provide news or information, and for other similar purposes. The message appears after the user presses CTRL+ALT+DEL and disappears after the user clicks OK.
In this post we will see on how to configure legal notices on domain computers using group policy. We will create a group policy, modify the policy settings and link it to the domain. I am configuring this policy on a domain controller running Windows server 2008 R2 SP1 edition.
Login to the domain controller machine with the administrator account. Click on Start, Click on Administrative Tools, Click on Group Policy Management. Under Domains, right click your domain and click on Create a GPO in this domain, and link it here.

We will create a policy named Logon_Banner. Click on OK.

Right the policy Logon_Banner and click on Edit. On Group Policy Management Editor, click on Computer Configuration, expand Policies, expand Windows Setttings, expand Security Settings, expand Local Policies, click on Security Options.

On the right pane look for the policy Interactive Logon : Message text for users attempting to log on. This security setting specifies a text message that is displayed to users when they log on. You can paste the Logon text that is to be displayed to the users before they log in. Click on Apply and OK.

On the right pane look for the policy Interactive Logon : Message title for users attempting to log on. This security setting allows the title to appear in the title bar of the window that contains the Interactive logon.Type the title text and click on Apply and OK.

On the client computer open the command prompt and run the command gpupdate.

Log off from the client computer. Hold CTRL+ALT and press DEL. You must find the logon banner. Click on OK to login to the computer.

Reference: http://prajwaldesai.com/how-to-configure-legal-notices-on-domain-computers-using-group-policy/

September 19, 2016

Folder Redirection, Roaming Profile Configured in Windows Server 2008 R2


A.Giới Thiệu Về Folder Redirection
Trong hệ điều hành Windows, Desktop, My Documents là một trong số những thư mục hệ thống quan trọng.
Ở các hộp thoại lưu dữ liệu, thư mục My Documents luôn chiếm vị trí “mặt tiền” cực kỳ thuận lợi giúp người dùng lưu nhanh các văn bản. Mặt khác Windows Explorer của bất cứ máy nào cũng đều có một thư mục My Documents tương ứng với tài khoản user khi họ logon. Dữ liệu lưu trong đây được mã hóa ứng với tài khoản user đó, và chỉ có thể được truy xuất bởi chính chủ nhân của tài khoản và administrator. Một vấn đề đặt ra là làm cách nào để bảo đảm thư mục My Documents trên mỗi máy client trong LAN luôn được backup một cách an toàn? Với hệ thống mạng quản lý theo domain, ta có giải pháp là Redirect Folder – hướng Target của tất cả các My Documents trên mỗi máy tính vào thư mục chia sẻ trên máy chủ. Khi đó cho dù máy client có bị hỏng ổ cứng hay cài lại HĐH, thì mọi dữ liệu của người dùng trong thư mục My Documents vẫn sẽ được bảo vệ an toàn.

Sau khi cấu hình Folder Redirection, thư mục My Documents của toàn bộ user sẽ được lưu trên server, giúp họ sử dụng được tài liệu của mình dù có di chuyển sang máy tính khác. Về cơ chế hoạt động và công dụng, Folder Redirection khá giống với tính năng Roaming Profiles. Tuy nhiên, thay vì “đẩy” toàn bộ profile người dùng (gồm thư mục My Documents, Desktop, Application Data ... lên server, Folder Redirection cho phép bạn lựa chọn một thư mục cần”đẩy” (chẳng hạn: thư mục My Documents, Start Menu, App Data, Desktop, tạo sự nhẹ nhàng cho hệ thống.)

  •  Triển Khai
bước 1: Tạo Folder tên Redirection tại ổ C và share full quyền cho everyone




Bước 2: Tạo 1 OU và tạo user thuộc OU đó.
Trong ví dụ này tôi muốn tính năng Folder Redirection chỉ tác động đến OU ITO.


Bước 3run -> gpmc.msc

Kích chuột phải lên ITO chọn Create a GPO in this domain.... và đặt tên là Folder Redirection ==> OK


Chuột phải lên GPO vừa tạo chọn edit, xuất hiện cửa sổ Group Policy Management Editor
Mở User Configuration -> Windows Setting -> Folder Redirection


Bên trong Folder Redirection liệt kê những thư mục có thể dùng được chức năng này, ở bài này tôi muốn Roaming 2 thư mục là Desktop & My documents , Chuột phải lên Documents chọn Properties


Hiển thị bảng Documents Properties
ô Setting chọn Basic - Redirect everyone's folder to the same location
dòng Root path bạn nhập \\SERVER\Redirection Trong đó SERVER là tên máy DC ,Folder Redirection là thư mục ta vừa tạo & Share lúc nãy. Sau đó chọn OK


Làm tương tự với thư mục Desktop.

Bước 4: Từ máy Client ta đăng nhập với Account u1 sẽ thấy thư mục mặc định của  My Documents  \\LT-AD\Redirection\u1


Hoặc ta có thể dùng rsop.msc ở client để kiểm tra



Hoặc ta có thể vô Server truy cập thư mục share để kiểm tra



B. ROAMING PROFILE

  • Sự khác nhau giữa Roaming Profiles và Local Profiles  

Trong môi trường mạng Windows, có những ưu và khuyết điểm liên quan đến việc sử dụng Roaming Profiles và Local Profiles. Ngoài vấn đề bảo mật, còn có vấn đề về mất dữ liệu, file lưu trữ băng thông và một số thứ khác. Trong bài viết này, tôi sẽ trình bày về Roaming Profiles và Local Profiles.

Profile là tổng hợp những dữ liệu đặc thù của một user. Nó bao gồm các dữ liệu như Favorites của IE, bookmark của Firefox, Outlook settings, và nhiều thứ khác. Windows được thiết kế để lưu dữ liệu của người dùng tại một địa điểm, giống như trên ổ cứng hoặc trên một server. Khi bạn logon và máy tính, nó sẽ tải dữ liệu trong profile của bạn kể cả những phần mềm được thiết lập để khởi động cùng windows.

Roaming Profiles là dạng profiles của người dùng được lưu trữ trên một server, nó sẽ được tải về máy tính bất cứ khi nào người dùng login. Theo cách này, người dùng có thể truy nhập đến thông tin và những thiết lập của họ mà không phụ thuộc vào máy tính mà họ đăng nhập. 

Local Profiles là dạng profiles được lưu trữ trực tiếp trên một máy tính, và rất ít dữ liệu được chuyển giữa PC và server khi họ logon vào.

Ưu điểm của Roaming Profile là nó sẽ tự động backup dữ liệu của người dùng đến server mỗi khi log out. Người dùng có thể đăng nhập trên nhiều máy tính mà vẫn dữ được những thiết lập của mình, điều này rất tốt trong môi trường mà mọi người làm việc không trên một máy tính cố định, chẳng hạn như một phòng lab.

Nhược điểm của Roaming Profile : khi người dùng đã logon , một bản sao của profiles của họ sẽ được lưu lại trên máy tính mà học đăng nhập, điều này tạo ra vấn đề về bảo mật. Thời gian đăng nhập cũng là một vấn đề, nếu người dùng đặt quá nhiều dữ liệu trong profiles của họ, có thể sẽ phải chờ đợi rất lâu khi đăng nhập hoặc tắt một máy tính. Kèm theo đó với profiles lớn còn chiếm nhiều băng thông để truyền dữ liệu qua lại, phần lowin trong số này là lượng băng thông bị lãng phí bởi nhiều tập tin và dữ liệu được tải đồng bộ tuy nhiên người dùng lại không dùng đến.

Còn về Local Profiles, ưu điểm chính của nó là thời gian đăng nhập vào máy tính nhanh hơn, vì dữ liệu được lưu trữ trực tiếp trên máy tính đó,  tuy nhiên người dùng lại không thể truy nhập profiles của họ khi đăng nhập trên một máy tính khác. Điều đó cũng có nghĩa là thiết lập cá nhân của người dùng sẽ bị mất, khi máy tính cá nhân của họ không còn làm việc.


  • Triền Khai






September 10, 2016

How to force Google Safe Search - Microsoft AD DNS

Forcing safe-search for Google is very simple, and pretty hard to turn off. Couple it together with filtering DNS queries and you’ve got yourself a pretty robust content filter.
First I’m going to show you the powershell way, then I will show you the GUI way.

add-dnsserverprimaryzone -ReplicationScope Forest -Name www.google.com -Verbose
Add-DnsServerResourceRecord -DName -ZoneName www.google.com -name "@" -DomainNameAlias forcesafesearch.google.com -Verbose
Add-DnsServerResourceRecordA -IPv4Address 216.239.38.120 -name "@" -ZoneName www.google.com -Verbose
As you can see the powershell way is the preferred method.
Here’s how to do it the GUI way:
Open up AD DNS or just type dnsmgmt.msc in a RUN box.
Add a new primary zone, replicated to the whole forest for “www.google.com”
Now go to the zone, and create a A record pointing to “216.239.38.120”.
Now right click and create ” other new records…” we’ll select DNAME.
Now add “forcesafesearch.google.com” as the FQDN, leave alias name blank.
Now flush your DNS and test it out!


if we try to turn safesearch off via the settings, it does not work!!!
Same result.


Enjoy.

References: http://techstat.net/microsoft-ad-dns-how-to-force-google-safe-search/


http://www.slideshare.net/laonap166/how-to-force-google-safe-search

September 8, 2016

HOW TO BACKUP AND RESTORE NTFS AND SHARED FOLDER PERMISSIONS



HOW TO BACKUP AND RESTORE NTFS AND SHARED FOLDER PERMISSIONS

To backup & restore NTFS permission you will find many utilities like NTBACKUP,  iCacls, Robocopy and FSMT.
Backup and Restore of Shared Permissions:
Generally, shared folder permissions are stored in registry at the following location.
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares,
you need to backup and restore this key values using export and import options.
Step 1: Open the registry ( Run | Regedit.exe )
Step 2: Navigate to the following location:
 HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
Step 3: Right Click on Shares Registry key in the Left pane, from context menu select Export.
Step4: Give the filename as shareperms.reg

When you want to restore the permissions, copy shareperms.reg file and paste to another server where you want to restore and then double click on that file to import.

USING COMMAND LINE UTILITY.
reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares c:\shareperms.reg
If you need to restore, copy and paste the file to C: location, just run:
reg import c:\shareperms.reg

Note: After restore you need to restart the Server service.
net stop lanmanserver
net start lanmanserver

BACKUP AND RESTORE OF NTFS PERMISSIONS

If your are using NTBackup to restore the data, you should select the checkbox to restore permissions as well.
Using icacls command to backup NTFS permissions:
icacls d:\sharedata /save ntfsperms.txt /t /c
The /T switch allows it to get subfolder permissions too. The /C switch allows it to continue even if errors are encountered (although errors will still be displayed).
Use this command to restore them:
icacls d:\ /restore ntfsperms.txt


August 22, 2016

Deny and allow workstation logons with Group Policy

One of the bigger challenges in some Active Directory environments is controlling who is allowed to log into workstations. By default, every user in AD automatically gets added to Domain Users. Domain Users is, once again by default, included in the local Users group on workstations when the workstations get added to AD. That means that unless you take action on either the user account or the computer configuration, any user account in your AD environment can log into any computer whether you want them to or not. If you’re in a smaller AD environment, this may not be a problem for you: you can go to the Account tab in Active Directory Users and Computers, click the “Log On To…” button and specify the computers the user is allowed to use.
Deny logon - ADUC Account tab Log On To
ADUC Account tab Log On To
However, in a larger environment, managing individual accounts can be very time consuming, especially if you have to manually specify computer names for every single user account that needs limited access. You can also run into other authentication problems using “Log On To…” if the account needs to access network resources.
The good news is that there is a Group Policy setting that works with every version of Windows that can be managed with Group Policy from Windows 2000 through Windows 8 that will solve this problem for you. These settings can be found in Computer Configuration > Policies > Security Settings > Local Policies > User Rights Assignment.
Deny logon - Setting in Group Policy Editor
Deny logon – Setting in Group Policy Editor

Deny log on locally ^

The “Deny log on locally” specifies the users or groups that are not allowed to log into the local computer. This policy can be found in Computer Configuration > Policies > Security Settings > Local Policies > User Rights Assignment > Deny log on locally.
Deny log on locally Properties
Deny log on locally Properties
In my example, I’ve created a special group just for user accounts that I don’t want logging into an OU of computers. However, you can use any AD group here. Just avoid default AD groups like Domain Users or any of the Admin groups if you don’t want to get locked out.

Allow log on locally ^

The “Allow log on locally” setting specifies the users or groups that are allowed to log into the local computer. This policy can be found in Computer Configuration > Policies > Security Settings > Local Policies > User Rights Assignment > Allow log on locally.
Allow log on locally Properties
Allow log on locally Properties
In my example, I’ve included the local workstation Administrators group, Domain Admins, and an AD group called “Allow Computer Logons.” With this configuration, only user accounts that are members of the local Admins group on the computer or one of the two AD groups are allowed to log in. Just as a reference, here is the default configuration for Windows 7:
Allow Log on locally Properties in Windows 7
Allow Log on locally Properties in Windows 7
If you happen to be a user that is not authorized to use a computer, here is the message the user will see on Windows XP:
The local policy of this system does not permit you to logon interactively
The local policy of this system does not permit you to logon interactively
And here is the error message they will see on Windows Vista or 7 (the message is the same for both except for the OS name):
You cannot log on because the logon method you are using is not allowed on this computer
You cannot log on because the logon method you are using is not allowed on this computer.

Tips ^

The Group Policy Management Console references Microsoft Knowledge Base article Q823659for the Allow log on locally setting. Despite the old-style “Q” naming convention that is referenced, the article is fairly current and still applies to the newer versions of Windows. The KB article gives several examples of harmful configurations and a few more justifications for why you should consider using these two settings.

  • Here are a few things to keep in mind if you decide to implement these settings:
  • DO NOT apply them to Domain Controllers.
  • DO NOT put the settings into either of the default GPO’s for Default Domain Policy or Default Domain Controllers Policy.
  • Deny trumps allow. If a user is in both Allow log on locally and Deny log on locally, Deny always wins.
  • Be on the lookout for software that creates local service accounts that need to be included in Allow Log on Locally. For instance, VMware Workstation and VMware Player have functionality that will not work unless the service account they create is included in Allow Log on Locally.
  • Only apply these settings to sub-sets of computers and not the entire Domain.
reference: https://4sysops.com/archives/deny-and-allow-workstation-logons-with-group-policy/

August 5, 2016

ACTIVE DIRECTORY RIGHTS MANAGEMENT SERVICES (AD RMS)

Sau khi hoàn thành xong bài lab này, bạn sẽ làm được:
- Cho user xem được tài liệu nhưng không cho copy
- Cho user xem được tài liệu nhưng không cho in
- Cho user xem nội dung email nhưng không cho copy, in hoặc forward mail



Bài viết được cung cấp bởi MCT TRẦN THỦY HOÀNG

I. Giới thiệu:
- Windows Server 2008 tích hợp sẵn dịch vụ Active Directoy Right Management Services (AD RMS). AD RMS có chức năng phân quyền trên tài nguyên (document, e-mail….)
- Các loại dữ liệu hỗ trợ quyền của AD RMS gồm: MS Word, MS Excel, MS Power Point, MS Outlook phiên bản 2003 và 2007.
- Mục đích bài lab là hướng dẫn cài đặt và cấu hình AD RMS. Bài lab gồm các bước:
1. Cài đặt RMS
2. Cấu hình RMS
3. Phân quyền trên tài nguyên
4. Kiểm tra quyền


II. Chuẩn bị: 
- Một máy Windows Server 2008 đã nâng cấp Domain Controller (trong bài lab sử dụng MS Virtual PC)
- Mở Microsoft Virtual PC, khởi động máy ảo WIN2K3_DC, log on Administrator@nhatnghe.com password P@ssword
- Tạo lần lượt các users trong bảng sau:
RMSAdmin/P@ssword 
U1/P@ssword 
U2/P@ssword 

- Cho user RMSAdmin làm thành viên của group Domain Admins
- Mở Properties user Administrator, điền thêm thông tin E-mail là Administrator@lab.com



- Mở Properties user U1, điền thêm thông tin E-mail là u1@lab.com



- Mở Properties user U2, điền thêm thông tin E-mail là u2@lab.com



III. Thực hiện:
1. Cài đặt RMS

- Mở Server Manager từ Administrative Tools, chuột phải Roles, chọn Add Roles



- Trong cửa sổ Before You Begin, chọn Next




- Cửa sổ Select Server Roles, đánh dấu chọn vào ô Active Directory Rights Management Services



- Trong hộp thoại Add Roles Wizard chọn Add Required Features



- Cửa sổ Select Server Roles, chọn Next



- Cửa sổ Active Directory Rights Management Services, chọn Next




- Cửa sổ Select Role Services, kiểm tra có đánh dấu chọn Active Directory Rights Management Server, chọn Next



- Cửa sổ Create or Join an AD RMS Cluster, chọn Next




- Cửa sổ Select Configuration Database, chọn Next



- Cửa sổ Specify Service Account, chọn Specify…




- Cửa sổ Add Roles Wizard, nhập user RMSAdmin password P@ssword, chọn OK



- Cửa sổ Specify Service Account, chọn Next




- Cửa sổ Configure AD RMS Cluster Key Storage, chọn Use AD RMS centrally managed key storage, chọn Next 



- Cửa sổ Specify AD RMS Cluster Key Password, nhập P@ssword vào ô Password và Confirm Password, chọn Next



- Cửa sổ Select AD RMS Cluster Web Site, chọn Default Web Site, chọn Next


- Cửa sổ Specify Cluster Address, chọn Use an SSL-encrypted connection (https://), chọn Next




- Cửa sổ Choose a Server Authentication Certificate for SSL Encryption, chọn Create a self-signed certificate for SSL encryption, chọn Next 



- Cửa sổ Name the Server Licensor Certificate, nhập tên máy Server (vd: PCxx)vào ô Name, chọn Next



- Cửa sổ Register AD RMS Service Connection Point, chọn Register the AD RMS service connection point now, chọn Next



- Cửa sổ Web Server (IIS), chọn Next




- Cửa sổ Select Role Servics, chọn Next



- Cửa sổ Confirm Installation Selections, chọn Install





- Sau khi cài đặt thành công, cửa sổ Installation Results, chọn Close



Lưu ý: Sau khi cài đặt thành công phải restart máy.


2. Cấu hình RMS
- Mở Active Directory Rights Management Services từ Administrative Tools
- Trong hộp thoại Seciurity Alert, chọn View Certificate





- Cửa sổ Certificate, chọn Install Certificate 



- Cửa sổ Welcome to the Certificate Import Wizard, chọn Next



- Cửa sổ Certificate Store, chọn Place all certificate in the following store, trong ô Certificate store, trỏ đường dẫn đến Trusted Root Certification Authorities, chọn Next



- Cửa sổ Completing the Certificate Import Wizard, chọn Finish




- Trong hộp thoại Security Warning, chọn Yes



- Hộp thoại Certificate Import Wizard, chọn OK



- Trong cửa sổ Active Directory Rights Management Services, bung RMS server (vd: PC01.msopenlab.com), kiểm tra cấu hình RMS thành công.




3. Phân quyền trên tài nguyên
- Mở Windows Exprorer, tạo file C:\Data\tailieu.doc có nội dung tùy ý.
- Mở file tailieu.doc, click vào biểu tượng , chọn Prepare, chọn Retrict Permission, chọn Restricted Access
- Cửa sổ Permission, add U1 vào ô Read, U2 vào ô Change, chọn OK




4. Kiểm tra quyền
- Log on user U1 password P@ssword
- Mở Windows Explorer, vào C:\Data mở tailieu.doc, cửa sổ chứng thực nhập user U1 password P@ssword, chọn OK




- Hộp thoại Security Alert, chọn Yes




- Hộp thoại Microsoft Office chọn OK




- Cửa sổ Microsoft Word, tại thanh Restricted Access chọn View Permission…




- Kiểm tra quyền của U1 trên tailieu.doc




- Tương tự như các bước trên, logon user U2 password P@ssword, vào C:\Data mở file tailieu.doc
- Trong hộp thoại chứng thực, nhập user U2 password P@ssword



- Cửa sổ Microsoft Word, tại thanh Restricted Access chọn View Permission…




- Kiểm tra quyền của U2 trên tailieu.doc




Nguồn: nhất nghệ

http://www.slideshare.net/laonap166/active-directory-rights-management-services-64724594