How to find user by login? RRS feed

  • Question

  • I'm writing a telegrambot for changing user's password in local network. So, i ask user for login and I need to ensure that acccount exists and then reset password by "dsmod user ..." command.

    I've tried to use "dsquery user -samid "login" but it doesn't work, its just resend command without any message.

    I thought that the problem in login. So i've tried to get user list in known group.

    AD have this structure



    |ПКО //cyrrilic


    ----|Вася Пупкин //samid ПупкинВ (cyrrilic)






    i've asked all groups in ad

    >dsquery ou DC=my,DC=domain







    >dsquery user "OU=162,OU=ПКО,DC=my,DC=domain"

    dsquery ou OU = 162, OU =?
    dsquery Failed: The main directory service link is not configured. Therefore, the directory service will not be able to provide references to objects outside this forest.
    type dsquery /? for help. (translated from russian)

    Soo, i need help with to ensure that account with some login exists to get dn from 1. and reset password


    p.s. sorry my english

    • Edited by ZarinRaim Wednesday, October 4, 2017 9:45 AM
    • Moved by Bill_Stewart Tuesday, November 7, 2017 10:50 PM Unanswerable drive-by question
    Wednesday, October 4, 2017 9:44 AM

All replies