Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Obtain list of default domains

  • 28-05-2009 1:20pm
    #1
    Closed Accounts Posts: 1,567 ✭✭✭


    does anyone know how to get a list of NT domains a computer is able to login to?
    not a complete list of domain controllers, something like what is presented to the user in a drop down list at the login screen (including the comptuer name)..i'd like to get the same list using some script/code.

    its possible the entries might be under registry key - not 100%
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DomainCache
    

    would this be it?


Comments

  • Closed Accounts Posts: 1,567 ✭✭✭Martyr


    ok, that appears to be where the list is kept/updated.

    another separate question is how to determine the domain each user profile belongs to?


  • Closed Accounts Posts: 1,567 ✭✭✭Martyr


    Found out that you can lookup the DOMAIN\USERNAME from the SID

    These are stored under :

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    i don't know if there is some way to do it through command line or script, but i just wrote simple function below which does the lookup based on SID string.

    [PHP]// using a string SID, print the DOMAIN\USERNAME
    void print_userid(char *strSid)
    {
    char user[MAX_PATH], domain[MAX_PATH];
    DWORD sizeUser, sizeDomain;
    SID_NAME_USE snu;
    PSID sid;

    if(ConvertStringSidToSid(strSid,&sid))
    {
    sizeUser = sizeof(user);
    sizeDomain = sizeof(domain);

    if(LookupAccountSid( NULL, sid, user, &sizeUser,
    domain, &sizeDomain, &snu ) != 0)
    {
    printf("%s\\%s", domain, user);
    } else printf("LookupAccountSid() failed : %d",GetLastError());
    LocalFree(sid);
    } else printf("\nConvertStringSidToSid() failed : %d",GetLastError());
    }[/php]

    might be of use to someone.


Advertisement