简体   繁体   中英

Regarding active directory user lookup with SAMAccountName syntax

We are trying to search for user details from our active directory with the following hierarchy.

domain - dom

forest- dom.cumul

the username is given as "dom\\user.name" with this syntax if a mapping for domain and IP is present in hosts file it allows login with the username. But doesn't allow searching for the username.

https://gallery.technet.microsoft.com/scriptcenter/4398ce37-67ac-4074-97f1-66db51ff0308#content . As per the above link on technet.microsoft.com, the lookup with smaAccountName syntax is not verified after the windows 2003 server. I'll attach the link once the account is verified. Can i please get a confirmation if its possible to perform an active directory user lookup with "domain\\user_name" syntax. When we use userPrincipalName it retrieves the user details correctly. The protocol used is LDAP and the language used in JAVA.

As per the below link SAMAccount logon name used to support clients and servers running earlier versions of the operating system, such as Windows NT 4.0, Windows 95, Windows 98, and LAN Manager. https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname

So does that mean Microsoft has deprecated the use of SAMAccount for the latest windows OS?

The sAMAccountName attribute can still be used for logging in. But keep in mind that the sAMAccountName does not include the domain.

So if you are given DOMAIN\\user_name , then the sAMAccountName is just user_name , and you would search for (sAMAccountName=user_name) to find the account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM