Showing posts with label Active Directory. Show all posts

Installation et Configuration Active Directory sous Windows Server 2008 R2 :






DHCP, DNS, Active Directory sous Windows Server 2008 R2 :






 ________________________________________


Follow us on Facebook


Follow us on Google+


________________________________________


I - Installation et Configuration du contrôleur du domaine Active Directory :



Allez dans le gestionnaire de serveur puis faites un clic droit sur Rôles, Ajouter des rôles.









Sélectionnez le rôle Services de domaine Active Directory et cliquez sur Suivant.







Si vous n'avez rien installé précédemment sur votre serveur, vous devrez ajouter des fonctionnalités du framework .NET en cliquant sur Ajouter les fonctionnalités requises.



Assistant Installation des services de domaine Active Directory (dcpromo.exe)




Nous allons maintenant commencer la création de votre Active Directory. Vous aurez le choix entre rejoindre une forêt existante ou créer un nouveau domaine dans une nouvelle forêt. Nous allons créer un nouveau domaine.




Vous allez ensuite pouvoir indiquer le nom
mûrement réfléchi de votre domaine racine de forêt.









En choisi le niveau fonctionnel de la forêt
Windows Server 2008 R2












Vous devrez ensuite indiquer le futur emplacement des fichiers servant à Active Directory. Il est recommandé de placer ces fichiers ailleurs que sur le disque système.





Tapez un mot de passe valide
On y arriver ensuite sur le résumé de l'installation qui va être faite. On peut exporter les paramètres de cette installation afin de la reproduire ailleurs : il s'agit du fichier de réponses exploitable en mode avancé.



L'installation peut prendre quelques minutes et doit se passer sans problèmes.







  • Intégration des serveurs dans le domaine Active Directory

     

       


    Aller dans les informations du système ou bouton droit sur post de travail > propriété
    Cliquez sur Modifier les paramètres .




    Dans l’Onglet Nom de l’ordinateur cliquez sur changer 











    Taper ensuit le Nom de Domain
    Et cliquez sur OK










    Entrer le nom et le mot de passe d’un Administrateur du domaine 







     si vous recevez le message ‘Bienvenue dans le domaine’ ça veut dire que le client est bien ajouté au domaine.
    Les clients sont bien ajouter.






     

Creation and Management of Organizational Units








Creation and Management of Organizational Units :

 

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________

 



Microsoft Windows Server 2003 provides several tools and snap comosants command line you can create organizational units and manage the configuration and use of accounts and resources in the model of your organization. You can also use the runtime scripts for Microsoft Windows platforms to manage organizational units.

Methods of creating and managing OUs The following list describes some snap-ins and command-line tools allow you to create and manage organizational units:


  •      Active Directory Users and Computers. This MMC allows you to create, edit and delete OUs. Use this software component plug when you only have a few organizational units to manage, or if you want to manage units interactively.

  •      Tools directory service. This toolkit command line to manage objects and querying information in Active Directory. The command line tools include Dsadd, and Dsmod Dsrm. The use of these tools with the parameter "or" you can add, modify and delete OUs in Active Directory. You can also use scripts and batch files with these tools to manage directory services.

  •      Ldifde (lightweight Directory Access Protocol Data Interchange FormatDirectory Exchange). This command line tool enables you to create OUs and other Active Directory objects. Ldifde uses an input file containing information about the objects to add, edit or delete. This information is stored as a series of records, separated by an empty line in the input file.

  •      Environment of Windows Script Host. You can create organizational units using Windows, or using Windows scripting with the components provided by the ADSI (Active Directory Service Interfaces). The use of scripts allows you to create organizational units within an application configuration, if necessary.

How to create and manage organizational units using tools directory service :


The command line tools Dsadd, and Dsmod Dsrm directory service allows you to create and manage organizational units from the command prompt. You can also use these commands in scripts and batch files. 

How to Create an Organizational Unit : 


To create an organizational unit, run the following command Dsadd from the command prompt:

             Dsadd ou NU_Organization_Unit –desc Description –d Domaine –u User_Name  –p Passoword
Where:
  • NU_Organization_Unit : Specify the unique name of the organizational unit that you want to add. For example, to add the OU SupportTechnique nwtraders.msft the domain, the DN is ou = supporttechnique, dc = nwtarders, dc = msft.
  • Description : Specify the description of the organizational unit that you want to add.
  •  Domaine : Specify the domain to connect to. By default, the computer is connected to the domain controller in the domain where it is logged.
  • User_Name : specify the name used to connect to a remote server. By default, the name of the current user is used. You can specify a user name using one of the following formats:
                                            • User name (for example, Linda)
                                            • Domain \ user name (for example, widgets \ Linda)
                                            • User principal name (UPN User Principal Name) (eg Linda@widgets.microsoft.com)
  • Password  : Is the password to use to log on to a server distant.Si you type * (asterisk), a password will be requested. 


How to Modify an organizational unit:


To change the description of an organizational unit, run the following command:


Dsmod ou NU_Organization_Unit -desc Description -d Domain -u
User_Name -p Password


The parameters that are passed to the command dsmod are the same as those of the dsadd. The new description must be passed as a parameter desc.


How to Delete an organizational unit:



 You must simply remove Active Directory organizational units that are no longer used. To delete an organizational unit, run the following command:


Dsmod ou NU_Organization_Unit -desc Description -d Domain -u
User_Name -p Password


The parameters that are passed to the command dsrm are the same as those of the dsadd. You can use the following additional parameters with DSRL:

  • Subtree. Specifically delete the object and all objects contained in the sub-tree underneath this object.

  • Exclude. Specifies not to remove the base object provided by NU_Unité_Organisatio when you remove the subtree located below. By default, only the specified base object is deleted. Exclude parameter can not be specified with the parameter subtree.



How to create and manage organizational units using the tools Ldifde :


The command line tool allows you to create Ldifde organizational units in batch mode and to define hierarchies of organizational units. You can also use Ldifde to edit and delete OUs.

procedure
The first step to perform is to use this tool to create the input file (*. Ldf) for use with Ldifde. After creating this file, you run the Ldifde command.

Follow these steps to create organizational units using the command line tool Ldifde:

1. Create an input file. The following example shows the format of the file:


dn: OU = ExempleOU, DC = nwtraders, DC = msft
changetype: add
objectClass: organizationalUnit


Changetype : determines the type of operation performed on the Active Directory object.
ObjectClass : specifies the class of the object in Active Directory.
In the previous example, adds an object Ldifde organizational unit called ExempleOU nwtraders.msft the field. You can add multiple organizational units by adding more entries like the one above. Each entry dn must be preceded by a blank line, except the first.
2. Run Ldifde to create, modify or delete OUs entering the following command: 
C: \> ldifde -i -k -f OUList.ldf -b User_Name_Domain  -p password
 
where: 
  •       -i specifies import mode. If it is not specified, the default mode is export.


  •      -k can ignore errors during an import operation and continue processing.


  •      -f specifies the file name to import or export.

     OUList.ldf is the input file.

  •      -b specifies the user name, the domain name and the password associated with the user account that will be used to execute the import or export.

How to create organizational units using environment Windows Script :


ADSI is a programmatic interface (API, Application Programming Interface) that you use from the environment of Windows Script Host to automate the administration of Active Directory. ADSI uses LDAP (Lightweight Directory Access Protocol) to communicate with Active Directory. All operations that you perform on ADSI Active Directory follow the same procedure. You must first connect to Active Directory. You can then perform tasks such as retrieving information about objects, and add, modify or delete objects. If vousq make changes to Active Directory, you must register in the Active Directory database so that they are retained.

Procedure:

Follow these steps to create an organizational unit using environment Windows Script Host:
Using the Notepad, create a text file with the extension *. Vbs. Place this file in the commands listed below in items a, b and c, then save


a) Start by logging onto the domain in which you want to create the organizational unit, as shown in the following example:

Set objDom = GetObject(« LDAP://dc=nwtraders,dc=msft ») 


b) Then create the OU OrganizationalUnit as specifying the type of object to create Active Directory and the name of the organizational unit, as shown in the following example: 

Set objOU = objDom.Create
(« OrganizationalUnit », « ou=NouvelleOU »)
In this example, New OU is the name of the organizational unit that you create.


c) Finally, save the information in the Active Directory database, as shown in the following example:
objOU.SetInfo


To run the commands in the file *. Vbs, type the following at the prompt comande:
Wscript nom_fichier_script.vbs
 




How to reset a user's password in Active Directory

 

How to reset a user's password in Active Directory :

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________

Active Directory allows Windows network administrators to centrally manage the user accounts, and other resources on a network. Users can use a single username and password to log in to any computer on the Active Directory domain. If you forget your password, you can reset it from the Active Directory Users management console. You must be an Active Directory administrator with the proper permissions to reset a user's password.


 

 

Instructions:


1- Click "Start," type "Mmc" into the search box at the bottom of the Start menu and press "Enter." If you don't see the search box, click "Run," type "Mmc" into the run dialog and press "Enter."

2- Click the "File" menu in the MMC window, and select "Add/Remove Snap-in."

3- Click "Add" to view the list of available snap-ins, select "Active Directory Users and Computers" in the list and click "Add."

4- Click the "Close" button, then click the "OK" button.

5- Navigate to the "Active Directory Users and Computers/Domain/Users" snap-in in the left pane, where "Domain" is the name of your Active Directory domain.

6- Right-click the name of the user you want to reset the password for in the right pane, and select "Reset Password."

7- Type a new password into the Password and Confirm Password boxes.

8- Click "OK."

LDAP Server installation and Configuring directory (OpenLDAP Linux)

 

 

 LDAP  Server installation and Configuring directory (OpenLDAP Linux)

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________

 

Présentation:

LDAP server is a database in which information is recorded in the form of a hierarchical tree.

Vérification :

   rpm -q openldap

suppression:

   rpm -e openldap

 

Installation

 

installation from Computer :

   rpm  -ivh openldap

 

installation from Internet:


    yum install openldap



Configuration:

 

We'll just configure the bare minimum for ldap works. We will come back to finish it later conf

So you have to edit the file / etc / ldap / slapd.conf

find rows

# The base of your directory in database #1
suffix          "blabla"

and replace with

# The base of your directory in database #1
suffix          "dc=domain,dc=net"

By convention we put the same suffix as the dns ldap. As for now we do not have the domain name I took Braveo mdl29

We will activate your account in the ldap admin with the password "password" Note that we keep the good suffix is easier

still in the file / etc / ldap / slapd.conf


rootdn  "cn=admin,dc=domain,dc=net"
rootpw  password

Pabon the password is not clear is terrible we will sha hashed in a console you type

slappasswd -h {sha}

it will ask you the password and reapply

New password: 
Re-enter new password: 


if you put password as the password it should give you

{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=

You copy the line and paste it into the rootpw slapd.conf file after giving

rootdn  "cn=admin,dc=domain,dc=net"
rootpw  {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=

Well, now you'll have to replace all occurrences or appears "cn = admin, dc = lallal" with "cn = admin, dc = domain, dc = net"

access to attrs=userPassword,shadowLastChange
        by dn="cn=admin,dc=domain,dc=net" write
        by anonymous auth
        by self write
        by * none


which changes the rights to the ldap userPassword for fields and shadowLastChange. admin has full access, it can read and write the owner can also change their own field and finally no access to the rest of the world

and finally we allow everyone to read the ldap


access to *
        by dn="cn=admin,dc=admin,dc=net" write
        by * read


We'll do a little test connection. On the server we will restart the LDAP so that they take into account our changes.

/etc/init.d/slapd restart


then we will do a search in the ldap connecting with the ldap admin account

ldapsearch -D "cn=admin,dc=domain,dc=net" -x -W


There is one but it does not give error. LDAP works

Now we will add fields in ldap. To do this we will modify the schema by adding the latest version of the qmail.schema
It is available at  LDAP

 Must copy it into the directory / etc / ldap / schema.

Then it must be declared in the file / etc / ldap / slapd

after the block is available


# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema

Must add a line

include         /etc/ldap/schema/qmail.schema

save and reboot
creating users

well our LDP works but it is empty. We'll fill it with a file in ldif format. for example braveo.ldif

er user here has more information than is needed, but it serves to illustrate the content of a ldap


dn: dc=domain,dc=net
objectClass: organizationalUnit
objectClass: dcobject
dc: mdl29
ou: mdl29


dn: ou=Users,dc=mdl29,dc=net
objectClass: organizationalUnit
ou: Users


dn: ou=groups,dc=mdl29,dc=net
objectClass: organizationalUnit
ou: groups


dn: ou=Fonctions,dc=mdl29,dc=net
objectClass: organizationalUnit
ou: Fonctions


dn: ou=Associations,dc=mdl29,dc=net
objectClass: organizationalUnit
ou: Associations

dn: uid=42,ou=Users,dc=mdl29,dc=net
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectclass: qmailuser
mailhost: mail1.mdl29.net
cn: bjensen
displayName: Babs Jensen
sn: Jensen
givenName: Barbara
initials: BJJ
uid: 42
mail: bjensen@mdl29.net
telephoneNumber: +1 408 555 1862
facsimileTelephoneNumber: +1 408 555 1992
mobile: +1 408 555 1941
roomNumber: 0209
carLicense: 6ABC246
o: Siroe
ou: Product Development
departmentNumber: 2604
employeeNumber: 42
employeeType: full time
preferredLanguage: fr, en-gb;q=0.8, en;q=0.7
userPassword: 123456
labeledURI: http://www.siroe.com/users/bjensen My Home Page

must stop ldap

/etc/init.d/slapd stop
 
delete the file ldap
 
rm -rf /var/lib/ldap/*
 
then populate the ldap
 
slapadd -l braveo.ldif 
 
change the permissions on the directory ldap
 
chown -R openldap:openldap /var/lib/ldap/    

ldap start

/etc/init.d/slapd start
 
 
to test

ldapsearch-x-jensen@domain.net mail = bdc = domain, dc = net-h localhost                                               



 LDAP  Server installation and Configuring directory (OpenLDAP Linux)