Add AD Account over ldap

**LDAP so Active Directory**
### Eve eden link za pomos: http://pig.made-it.com/pig-adusers.html
### Za password treba so attribute $”unicodePwd”, taka da pazi 😀
### Prvo e potrebno da se enkodira Passwordot so $”UTF16LE” od $”UTF16″ pa so $”base64″

 

## Za enkripcija na password se koristi ovaa komanda
echo -n “\”Password\”” | iconv -f UTF8 -t UTF16LE | base64 -w 0

 

## Posle ti treba ovoj ldif fajl
#####################################################
dn: CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: filip
sn: filip
telephoneNumber: 1234563213123
sAMAccountName: filip
userPrincipalName: filip@ehealthdev.local

 

dn: CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local
changetype: modify
replace: unicodePwd
unicodePwd::IgBDAG8AcwBoAHkAJgA5ADYAOQAiAA==

 

dn: CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local
changetype: modify
replace: userAccountControl
userAccountControl: 512
#####################################################

 

## Za dodavanje korisnik vo AD so LDAP Mora da ti bide Secure konekcijata za da moze unicodePwd (Passwordot) da se stavi
ldapadd -H ldaps://192.168.56.104:636 -x -D “CN=Administrator,CN=Users,DC=ehealthdev,DC=local” -W -f proba.ldif

 

## Za prelistuvanje na Domain Component i proverka dali akauntot e OK
ldapsearch -x -D “CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local” -W -H ldap://192.168.56.104 -b “dc=ehealthdev,dc=local”

Add AD Account over ldap was last modified: April 1st, 2024 by Jovan Stosic