Monday, January 23, 2017

Convert Username to SID and Vice Versa

In Windows environment, each domain and local user, a group or other security objects are assigned a unique identifier — Security Identifier or SID.
SID used to control access to different resources: network shares, registry keys, file system objects, etc.
Now we will see some simple ways to get SID by username and the reverse.
 

Friday, January 13, 2017

Set default OU for new Users in AD

Log into a Domain Controller as a Domain Admin
Open a CMD prompt


To change the default container for user objects, enter:

ReDirUsr Container-DN

where Container-DN is the DistinguishedName name of the container that will become the default location for newly created user objects.

For example:

   redirusr "OU=New Users,DC=mydomain,DC=com"



To revert to the default settings you will need to run the following commands:

   redirusr cn=users,DC=company,dc=com"

Note: the domain functional level must be at least Windows Server 2003

Set default OU for new Computers in AD

Log into a Domain Controller as a Domain Admin
Open a CMD prompt
 
To change the default container for computer objects, enter:
 
ReDirCmp Container-DN
 
where Container-DN is the DistinguishedName name of the container that will become the default location for newly created computer objects.
 
For example:
 
   redircmp "OU=New Computers,DC=mydomain,DC=com"

 

To revert to the default settings you will need to run the following commands:
 
   redircmp cn=computers,DC=company,dc=com"
 
Note: the domain functional level must be at least Windows Server 2003