diff --git a/.gitignore b/.gitignore
index aa8e42a..27c925b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 *.swp
 *.pyc
 .ropeproject
+.idea/
diff --git a/_modules/artifactory_config.py b/_modules/artifactory_config.py
new file mode 100644
index 0000000..5fa4e66
--- /dev/null
+++ b/_modules/artifactory_config.py
@@ -0,0 +1,168 @@
+# -*- coding: utf-8 -*-
+'''
+Module for configuring Artifactory.
+change admin password
+add license key
+confingure ldap
+'''
+
+# Import python libs
+from __future__ import absolute_import
+import os
+import base64
+import logging
+
+# Import Salt libs
+import salt.utils
+import salt.ext.six.moves.http_client  # pylint: disable=import-error,redefined-builtin,no-name-in-module
+from salt.ext.six.moves import urllib  # pylint: disable=no-name-in-module
+from salt.ext.six.moves.urllib.error import HTTPError, URLError  # pylint: disable=no-name-in-module
+
+import json
+import requests
+
+log = logging.getLogger(__name__)
+
+__virtualname__ = 'artifactory_config'
+
+
+def __virtual__():
+
+    return True
+
+
+
+#    "repoLayoutRef" : "maven-2-default",
+
+class Artifactoryconfig:
+
+    def __init__(self, config={}):
+
+        self.files = []
+        self.def_password = 'password'
+        self.def_user= 'admin'
+
+
+        client_config = {
+            'artifactory_url': 'http://your-instance/artifactory/api',
+            'username': 'your-user',
+            'password': 'password',
+            'license_key' :'key',
+            'artifactory_ldap_url': 'http://localhost',
+#            'headers': {'Content-type': 'application/json'},
+            'ssl_verify': True
+        }
+
+        client_config.update(config)
+
+        # Set instance variables for every value in party_config
+        for k, v in client_config.items():
+            setattr(self, '%s' % (k,), v)
+
+    def change_admin_password(self,  **connection_args):
+        """
+        Usage: POST /api/security/users/authorization/changePassword  -H "Content-type: application/json" -d ' { "userName" : "{user}", "oldPassword" : "{old password}", "newPassword1" : "{new password}", "newPassword2" : "{verify new password}" }
+        :param connection_args:
+        :return: 0 if ok
+        """
+
+        url = self.artifactory_url + '/security/users/authorization/changePassword'
+        log.error(str(url))
+        data_pass={ "userName": self.def_user, "oldPassword": self.def_password, "newPassword2": self.password,"newPassword1": self.password}
+        auth = (self.username, self.def_password)
+
+        r = requests.post(url, auth=auth, json=data_pass)
+        log.error(str(r.text))
+        return r
+
+    def add_license_key(self, **connection_args):
+        """
+        Usage: POST /api/system/license
+        :param connection_args:
+        :return: 0 if ok
+        """
+        url = self.artifactory_url +'/system/license'
+        log.error(str(url))
+        auth = (self.username, self.password)
+        key = {"licenseKey": self.license_key}
+        log.error(str(key))
+        r = requests.post(url, auth=auth, json=key)
+        log.error(str(r.text))
+        return r
+
+    def configure_ldap(self, **connection_args):
+        url = self.artifactory_url + '/system/configuration'
+        auth = (self.username, self.password)
+        # r = requests.post(url,auth=auth,json=data)
+
+        r = requests.get(url, auth=auth)
+        # print json.dumps(r.text)
+        #log.error(str(r.text))
+
+        ldap_url = self.artifactory_ldap_url
+        searchFilter = "uid={0}"
+        xmlTemplate = """
+                    <ldapSetting>
+                        <key>ldap</key>
+                        <enabled>true</enabled>
+                        <ldapUrl>%(url)s</ldapUrl>
+                        <search>
+                            <searchFilter>%(sf)s</searchFilter>
+                            <searchSubTree>true</searchSubTree>
+                        </search>
+                        <autoCreateUser>true</autoCreateUser>
+                        <emailAttribute>mail</emailAttribute>
+                        <ldapPoisoningProtection>true</ldapPoisoningProtection>
+                    </ldapSetting>
+                    """
+        xml_date = {'url': ldap_url, 'sf': searchFilter}
+        a = xmlTemplate % xml_date
+#        log.error(str( r.text))
+        z = str(r.text).split('<ldapSettings/>')
+        out = str(z[0] + '<ldapSettings>' + a + '</ldapSettings>' + z[1])
+
+        # out=str(r.text).split('<ldapSettings/>')[0]+'<ldapSettings/>'+str(r.text).split('<ldapSettings/>')[1]
+        headers = {'Content-Type': 'application/xml'}
+
+        r = requests.post(url, auth=auth, data=out, headers=headers)
+        log.error(str(r.text))
+        return r
+
+def _client(**connection_args):
+    '''
+    Set up artifactory credentials
+
+    '''
+
+    prefix = "artifactory"
+
+    # look in connection_args first, then default to config file
+    def get(key, default=None):
+        return connection_args.get('connection_' + key,
+            __salt__['config.get'](prefix, {})).get(key, default)
+
+    client_config = {
+      'artifactory_url': '%s://%s:%s/artifactory/api' % (get('proto', 'http'), get('host', 'localhost'), get('port', '8080')),
+      'ssl_verify': get('ssl_verify', True),'license_key':get('license_key','key'),'artifactory_ldap_url':get('ldap_server','url'),
+      'ldap_searchFilter':get('ldap_searchFilter','uid={0}'),'ldap_account_base':get('ldap_account_base','accaunt')
+    }
+
+    user = get('user', False)
+    password = get('password', False)
+    if user and password:
+      client_config['username'] = user
+      client_config['password'] = password
+
+    artifactory_config = Artifactoryconfig(client_config)
+
+    return artifactory_config
+
+
+
+def artifactory_init(**connection_args):
+
+    artifactory = _client(**connection_args)
+    artifactory.change_admin_password()
+    artifactory.add_license_key()
+    artifactory.configure_ldap()
+
diff --git a/_states/artifactory_config.py b/_states/artifactory_config.py
new file mode 100644
index 0000000..683ccc9
--- /dev/null
+++ b/_states/artifactory_config.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+'''
+Management of artifactory configuration
+======================================
+
+:depends:   - requests Python module
+:configuration: See :py:mod:`salt.modules.artifactory` for setup instructions.
+'''
+
+def __virtual__():
+    '''
+    Only load if the artifactory module is in __salt__
+    '''
+    return True
+
+
+def artifactory_init( **kwargs):
+    
+    out = __salt__['artifactory_config.artifactory_init']( **kwargs)
+
+    return out
diff --git a/artifactory/client.sls b/artifactory/client.sls
index dfedfd9..7588d7d 100644
--- a/artifactory/client.sls
+++ b/artifactory/client.sls
@@ -5,6 +5,9 @@
   pkg.installed:
   - names: {{ client.pkgs }}
 
+artifactory_config:
+    artifactory_config.artifactory_init
+
 {%- for repo_name, repo in client.repo.iteritems() %}
 
 artifactory_client_repo_{{ repo_name }}:
diff --git a/artifactory/meta/salt.yml b/artifactory/meta/salt.yml
index b21c18d..e3cc8b2 100644
--- a/artifactory/meta/salt.yml
+++ b/artifactory/meta/salt.yml
@@ -11,4 +11,11 @@
       user: {{ client.server.user }}
       password: {{ client.server.password }}
       {%- endif %}
+      {%- if client.server.license_key is defined %}
+      license_key: {{ client.server.license_key }}
+      ldap_server: {{ client.server.ldap_server }}
+      ldap_account_base: {{ client.server.ldap_account_base }}
+      ldap_searchFilter: {{ client.server.ldap_searchFilter }}
+      {%- endif %}
+
   {%- endif %}
