Monday, May 15, 2017

Add an Active Directory group to the local administrator group of workstation(s)

Introduction

This tutorial will illustrate how to add an Active Directory group to the local administrator group of a workstation(s) using Restricted Groups via Group Policy. This can be useful for temporarily allowing a user or groups of users local administrative access to the workstation if software updates or software installation requires those rights. By adding a AD group to the local workstation administrative group, this allows you to remove users at your own will from that group in Active Directory.
Keep in mind that this Group Policy will apply to every workstation within the OU that you assign the group policy. Be extremely careful what workstations you are applying the group policy to. Also, this method should be used with caution and users added to the security group in Active Directory should be monitored.

Steps (8 total)

1

Create a new group in Active Driectory

Create a new group in Active Driectory that you wish to add to every workstations local administrator group. DO NOT add any users to this group at this time.
2

Create a new GPO

Create a new group policy object and link it to the desired OU. Make sure that the GPO you are using covers the OU that the WORKSTATIONS you are wanting to give users local administrative rights over.
DO NOT add this GPO or restricted group setting to your default domain policy. Make sure that the OU you apply this GPO to covers only the workstations that you wish to provide the affected users local admin rights on.
3

Edit the newly created GPO

Navigate within the newly created GPO to Computer Configuration -> Policies -> Windows Settings -> Security Settings --> Restricted Groups
4

Add your new Active Directory group to the Restricted Group

Right-click the Restricted Groups folder and select "Add Group" to add your new Active Directory group to the Restricted Group. In the Group field, type the name of the newly created Active Directory group and click "OK"
5

Add the Restricted Group to the local administrator group

In the Restricted Group Properties windows click "Add" under the section titled "This group is a member of:" Type "Administrators" (without the quotes and yes it is plural), in the Group Membership window and click "OK"
6

Wait for GPO updates to apply to the workstations

Once your users receive their updated group policy settings every workstation within the OU you specified will have your new Active Directory group as a member of the local administrators group. If you need to force the GPO update on a specific workstation, run "gpupdate /force" in a command window on that workstation.
7

Add a user or group of users to the Active Directory Restricted Group

When you are ready, or in a position where you need to provide local workstation admin rights you can simply add the users or group of users to the Active Directory group that you created for use with Restricted Groups within your Active Directory Management Console.
8

Remove the user or group of users from the AD restriced group

When the user or group of users no longer need the local admin rights simply remove the user(s) from the Active Directory group and have the user log off or reboot the workstation.

Conclusion

This process can specifically be used as a method for automated software upgrade rollouts. Some software vendors have mechanisms for deploying software updates automatically when a user logs in to the software. However, many times these automatic installations also assume that all users have local admin right (Which is crazy right?).
Also, here was the tutorial I followed when I was first learning about Restricted Groups:
http://www.frickelsoft.net/blog/?p=13
However, it is important to mention that my steps do not follow that blog post 100%. I used an Active Directory group instead of simply adding users to the restricted group. Using groups adds more flexibility for managing the Restricted Group itself. Also, if you add a user to a restricted group you would have to manually go around to each workstation and remove that user from the local admin group. By using a Group you can simply remove the user from the group in Active Directory.

Wednesday, March 29, 2017

How to fix NSLOOKUP Default Server: UnKnown?

Issue : "Default Server:  UnKnown" error on NSLOOKUP from Windows Server DNS Server.


This issue is not a critical one. Even under this error your DNS resolution can work smoothly. But it's embarrassing when there are issues like this. Right?. Yes I know! me too. :D

The reason for this is your DNS server does not posses a record for the server itself. Or simply it does not know what is it's own name. By creating a PTR static entry we can fix this and let DNS server know it's own name.


1. Open the DNS management console in the Server
        Start > Administrative Tools > DNS

2. Go to the your Reverse Lookup Zone icon and right click on it and select "New Pointer(PTR)".




3. In the New PTR window enter the  IP address of DNS server and enter(or select) the host name of the server.



4. Now click OK and restart the DNS server service.

Now check to see if it is working.

How to fix NSLOOKUP *** UnKnown can't find : Non-existent domain?

Issue : " *** UnKnown can't find : Non-existent domain" on NSLOOKUP from Windows Server 2008 DNS server



The reason for this error is there is there is no any Reverse Lookup Zone configured on the server. Or the Reverse zone is crashed. To fix this issue you need to create or reconfigure the reverse lookup zone.

Here is the way to do it.
1. Open the DNS management console in the Server 2008
        Start > Administrative Tools > DNS

2. Go to the Reverse Zone Lookup folder icon, Right click on it and Select New Zone


3. New Zone Wizard will open up and click Next.

4. Select Primary Zone as the Zone Type and click Next.

5. Here you can select the Zone Replication Scope as you like. If you are not sure select    servers in the domain and click Next.

6. Select the address type based on your requirement (Here I use IPV4) and Next.

7. Type the first three octets of your network IPV4 address range like 192.168.1 and click Next.


8. Select Secure Update and click Next.

9. Click Finish and Restart the DNS Server service.

Now it will take some time based on the network utilization to learn the addresses and when it is finished your nslookup will work fine.

Tuesday, March 28, 2017

How to Allow Multiple RDP Sessions in Windows 10

Like in previous client versions of Microsoft operation systems, Windows 10 Pro and Enterprise users can connect to their computers remotely using Remote Desktop service (RDP). There is a restriction on the number of simultaneous RDP sessions: only one remote user can work at a time. When you try to open a second RDP session, the session of the first user is prompted to be closed.
Another user is signed in. If you continue, they’ll be disconnected. Do you want to sign in anyway?
Another user is signed in. If you continue, they’ll be disconnected. Do you want to sign in anyway?
Actually, the number of simultaneous rdp connections is limited rather by the license, which does not allow to create an RDP server based on the workstation for use by several users, than by any technical aspect.
Tip. In Windows 10 Home editions, the incoming remote desktop connections are forbidden at all. The problem, however, can be solved using RDP Wrapper Library.
Let’s consider two ways how to eliminate the restriction of simultaneous RDP connections to Windows 10:
Note. System modifications described in the article will be probably treated as a violation of Microsoft License Agreement with all the consequences that come with it.

The Modification of termsrv.dll

The restriction on the number of RDP connections can be eliminated using termsrv.dll file (a library file used by Remote Desktop Services) modification. The file is located in C:\Windows\System32) directory.
Before termsrv.dll file modification, create its backup (if necessary, you can use the original version of the file):
copy c:\Windows\System32\termsrv.dll termsrv.dll_backup
backup original termsrv.dll
Before termsrv.dll file editing, you have to become its owner and give the Administrators group the full rights to it (all steps are similar to those described in the article “Enable Multiple Concurrent RDP Sessions in Windows 8”). After that, stop Remote Desktop service (TermService) in services.msc console or from the command prompt:
Net stop TermService
Stop TermService
For Windows 10 x64 RTM edition (termsrv.dll file version is 10.0.10240.16384):
Open termsrv.dll file using any HEX editor (for example, Tiny Hexer)
Find the line:
39 81 3C 06 00 00 0F 84 73 42 02 00
Replace it with:
B8 00 01 00 00 89 81 38 06 00 00 90
Tiny Hexer Editor
Save the file and run TermService.
The ready patched termsrv.dll file for Windows 10 Pro x64 can be downloaded here: termsrv_for_windows_10_x64_10240.zip

RDP Wrapper Library

The alternative to termsrv.dll file modification is the use of RDP Wrapper Library project. This software serves as a layer between SCM (Service Control Manager) and Terminal Services and allows not only to enable the support of several simultaneous RDP sessions but also to enable the support of RDP Host on Windows 10 Home editions. RDP Wrapper does not make any changes to termsrv.dll file, it just load termsrv with the changed parameters.
Thus, this solution will work even in case of termsrv.dll file update. It allows not to be afraid of Windows updates.
RDP Wrapper can be downloaded from GitHub repository: https://github.com/binarymaster/rdpwrap/releases (the last version available is RDP Wrapper Library v1.6)
Tip. By the way, RDP Wrapper Library source code is also available. It means that if required, you can compile executables by yourself.
RDPWrap-v1.6.zip archive contains some files:
  • RDPWinst.exe — an RDP Wrapper Library install/uninstall program
  • RDPConf.exe — an RDP Wrapper configuration utility
  • RDPCheck.exe — Local RDP Checker — an RDP check utility
  • install.bat, uninstall.bat, update.bat — batch files for installation, uninstallation and update of RDP Wrapper
RDPWrap-v1.6
To install the utility, run install.bat with the Administrator privileges.
install RDP Wrapper Library
When the installation is over, run RDPConfig.exe. Make sure that all elements in Diagnostics section are green.
RDP Wrapper Configuration Utility
Try to open the second RDP session. It worked out well! Now, our Windows 10 allows two users to start RDP sessions simultaneously.
multiple RDP sessions on Windows 10