Sada je: 30 svi 2020, 16:44.
Linux, poslužitelj, mreže i sigurnost

Moderator/ica: Moderatori/ce

Evo ti ispravak (testirano na 2008 AD):

Kod: Označi sve
ldapsearch -LLL -D 'DOMENA\USERNAME' -W -H ldap://TVOJ_AD_HOST -b 'dc=domain,dc=tld' -s sub '(sAMAccountName=USERNAME)'
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
Avatar
Postovi: 910
Postovi: 910
Pridružen/a: 12 svi 2010, 07:57
Podijelio/la zahvalu: 0 puta
Primio/la zahvalu: 13 puta
OS: linux
to radi, evo izlaz:

Kod: Označi sve
dn:: Q049TWFyaWphbiDEjGFyZGnEhyxDTj1Vc2VycyxEQz1tc3YtZG9tYWluLERDPWxvY2Fs
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn:: TWFyaWphbiDEjGFyZGnEhw==
sn:: xIxhcmRpxIc=
givenName: Moje_ime
distinguishedName:: Q049TWFyaWphbiDEjGFyZGnEhyxDTj1Vc2VycyxEQz1tc3YtZG9tYWluLE
 RDPWxvY2Fs
instanceType: 4
whenCreated: 20121022121239.0Z
whenChanged: 20130123123339.0Z
displayName:: TWFyaWphbiDEjGFyZGnEhw==
uSNCreated: 2152846
memberOf: CN=nesto-users,CN=Users,DC=domain,DC=local
memberOf: CN=nesto-developers,CN=Users,DC=domain,DC=local
memberOf: CN=nesto-administrators,CN=Users,DC=domain,DC=local
memberOf: CN=nesto,CN=Users,DC=domain,DC=local
memberOf: CN=DBUser,CN=Users,DC=domain,DC=local
memberOf: CN=DBAdmin,CN=Users,DC=domain,DC=local
memberOf: CN=Domain Admins,CN=Users,DC=domain,DC=local
memberOf: CN=Administrators,CN=Builtin,DC=domain,DC=local
uSNChanged: 2365820
name:: TWFyaWphbiDEjGFyZGnEhw==
objectGUID:: REE1PFlf/E2W3C4puu4Eag==
userAccountControl: 66048
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 130025637244235246
lastLogoff: 0
lastLogon: 130035760590439900
pwdLastSet: 129953815595586212
primaryGroupID: 513
userParameters:: bTogICAgICAgICAgICAgICAgICAgIGQJICAgICAgICAgICAgICAgICAgICAgI
 CAg
objectSid:: AQUAAAAAAAUVAAAA4Xpq9JzZ+vFuWUNBsAQAAA==
adminCount: 1
accountExpires: 9223372036854775807
logonCount: 74
sAMAccountName: Moje_ime
sAMAccountType: 805306368
userPrincipalName: Moje_ime@domain.local
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=domain,DC=local
msNPAllowDialin: TRUE
lastLogonTimestamp: 130034180195681345

# refldap://ForestDnsZones.domain.local/DC=ForestDnsZones,DC=domain,D
 C=local

# refldap://DomainDnsZones.domain.local/DC=DomainDnsZones,DC=domain,D
 C=local

# refldap://domain.local/CN=Configuration,DC=domain,DC=local
Avatar
Postovi: 84
Postovi: 84
Pridružen/a: 03 stu 2012, 23:02
Podijelio/la zahvalu: 1 puta
Primio/la zahvalu: 0 puta
Spol: M
OS: CentOS 6.3
Znaci, bindDN ti je DOMENA\USERNAME ili USERNAME@DOMENA.TLD.

Search context ti je dc=domain,dc=tld.

Oznaci "Search users from subcontexts" te dodaj u opcionalno polje atribut sAMAccountName.
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
Avatar
Postovi: 910
Postovi: 910
Pridružen/a: 12 svi 2010, 07:57
Podijelio/la zahvalu: 0 puta
Primio/la zahvalu: 13 puta
OS: linux
To je to, radi. Mnogo zahvaljujem na pomoci.
Avatar
Postovi: 84
Postovi: 84
Pridružen/a: 03 stu 2012, 23:02
Podijelio/la zahvalu: 1 puta
Primio/la zahvalu: 0 puta
Spol: M
OS: CentOS 6.3
Nema na cemu. Uzivaj.

EDIT:
Daj please oznaci thread [RIJESENO], za buducu referencu.
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
Avatar
Postovi: 910
Postovi: 910
Pridružen/a: 12 svi 2010, 07:57
Podijelio/la zahvalu: 0 puta
Primio/la zahvalu: 13 puta
OS: linux

Na mreži
Trenutno korisnika/ca: / i 2 gostiju.