How can I know the domain name in wich user has loged ?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How can I know the domain name in wich user has loged ?

  1. #1
    Dennes Torres Guest

    How can I know the domain name in wich user has loged ?



    Hi!

    Using API I can discover the machine name and the user name, but How can
    I discover the domain name ?

    I'm creating a security system. In this system the administrator can, with
    my application, configure wich nt/2000 users will have access to the application.
    So the application will not have a login screen, it will grant the access
    (or not) depending of the user logged in.

    But I will have problems if the application run in a computer outside the
    domain, so a hacker could create user accounts with the same name of users
    that have full access and the security will not work.

    So, I have two options to solve this problem :

    A) Compare domain names
    B) Compare users SID's

    How can I do that ?

    Obs: Sory by my english, I don't speak english well


    []'s

    Dennes Torres




  2. #2
    Karl E. Peterson Guest

    Re: How can I know the domain name in wich user has loged ?

    See the NetDomain.zip sample on http://www.mvps.org/vb
    --
    [Microsoft Basic: 1976-2001, RIP]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center