Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Get A List Of Users Logged In A Domain


hi.. does anyone know how to get a list of usrs logged in a domain.. ie.. a Win2k comp.. and to retreive other info such as what type the user is.. ie.. administrator, guest, etc. and the IP adress or the computer name.

thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Get List Of Users Logged Onto A Domain
I want to write a stand alone app that will take whoever is logged on our company's domain and dump that list to HTML every so many minutes (to see who is in the office).

Can anyone help?

We have 1 share that everyone connects to, and I tried using NET SHARE "SHARENAME" > userdump.txt
And pulling users from that - BUT it wasn't truly listing everyone that was signed on....

I've found some source that shows this but none of it works...

Anyone?

Chris

Users Currently Logged On To A Domain
I have been searching the forum and found a link to the following code.


VB Code:
Private Sub Command1_Click()Set objDomain = GetObject("WinNT://domain_name,domain")objDomain.Filter = Array("User") For Each objuser In objDomain    Wscript.Echo objuser.NameNext End Sub


modified slightly to suit my domain this returns all the user accounts present on the domain. is there any way of returning there status ? i.e logging in

i assume it is to do with the

objuser

i have looked through the object browser and canot find this or a list of its .operators

could anyone help with a list of the operators availible to this ??

i do not have MSDN installed

thanks in avance

Joey

Enumerate Domain And Find Local Logged On Users
All,

I am attempting to write a progam that will find all the computers on my domain, and then tell me who is logged on to that computer and place is information in a listbox, or listview box.

Does anyone have a program that will do this already? I can enumerate my computers, then pass the computer name over to a module that will tell me who is logged onto a given computer name, but it does not produce the results expected. It is having trouble locating the logged on use at this point.

TIA

List Logged On Users
Hello

I want to be able to get a list of all the logged on users logged on to a Windows 2003 Server (or the Windows 2000 Server Family; because they are very similar). I have some code that i tried on a domain-less network (workgroup) and it worked by providing the users that were connected to my computer using my files. But i assume that Windows 200x Server login works different because it doesn't returns any users logged on.

I have attached the project that i made to try to get it to work.

Thanks in advance for any help your can provide

Regards, Jono

Get A List Of Logged Users In Server
Hi there,

Is it possible for me (using API or so) to get a list of all users logged on to the network?

Please help.

André

How Do I List Users Logged On To Local Network ??
hiya..

i need to populate a combobox with a list of users currently logged on to my local network.. have a feeling i need to use NetLocalGroupGetMembers but i'm a little lost.. can anyone help ?

List Of Logged-in Users To Server Network
Hi,
anybody know how to find the list of network users who hav logged in?
let say that my server is Win NT or Win 2000. 10 systems are connected to it.
I've created user accounts.
I want to have a VB program which can tell which user logged in and what time...
 
i know there is win API "EnumUser" which used to get the list of all the users...
but i want also to know, who are all currently logged in to the windows network...
any idea?

Shankar

List Of Logged-in Users To Windows Network
anybody know how to find the list of network users who hav logged in?
let say that my server is Win NT or Win 2000. 10 systems are connected to it. I've created user accounts.
I want to have a VB program which can tell which user logged in and what time...

i know there is win API "EnumUser" which used to get the list of all the users...
but i want also to know, who are all currently logged in to the windows network...
any idea?

Domain Users List
Hi all,

I would like to get the Domain Users List of my NT4.0 Domain (I'm a Domain Admins so I've no security problem).

Does anyone knows how I can develop an application or can say me what I have to use?

Please help! :-)

List Of Users On Domain/Server
Hi,

I want to know how to get a list of all the user's on a domain or server.

This is a lil urgent. Please help.

List All Domain Users But Not Those Disabled/lockedout Ones
Hello everyone,

I have a problem needs your help. I am using NetUserEnum to list all the domain users in a Windows 2000 environment. It works fine, but those disabled/lockedout users are still showing up. Is there any way to filter those out?

The following is the code I am using to get the user list:

Code:

rlngErrorNum = NetUserEnum(abytServerName(0), USER_INFO_0, FILTER_NORMAL_ACCOUNT, _
lngBufPtr, lngBufLen, lngEntriesRead, lngTotalEntries, lngResumeHandle)


Thanks a lot.

Getting Userlist Of The Domain While Not Logged In That Domain
hi all,

how can i finf the userlist of the domain when i am not logged in the domain. i got the list using following code.

Set DomainName = objRootDSE.OpenDSObject("WinNT://TESTDOM", "abc", "xyz", ADS_SECURE_AUTHENTICATION)

DomainName.Filter = Array("User")
For Each usrName In DomainName
MsgBox usrName.Name
Next

But I want to get the list in case of not knowing UserName and Password

Thanks in advance.


- Sandeep

Current Logged On Domain
OK. Am writing a VB6 application where i am going to get the user to re-verify their logon creds.

So, i am using the GetUserName (ADVAPI32) API call and this is being used to populate a dialog box with user, password and domain.

I am then calling the LogonUser (ADVAPI32) API call to validate that the password entered by the user is correct.

One problem, how do i populate the current logged on domain in my dialog box in order to make the correct call to logonuser.

i.e. what is the API call that gets me the value of the domain which i selected when i first logged into the operating system.

Getting The User Logged In A Particular Domain
Hi,
My friend asked me the following.Place combo boxex .Load the first combo box with list of username for a particular and domain.Load the second combo box with list of computers connected to that domain.When click the second combo box value , display the user who is logged in that particular machine? how can I ?.

Need Help Getting All Groups In Domain That Im Logged Into
Hi

Im still trying to figure out how to get a list of all groups in the domain that Im logged into.

I looked at this code on a web site:
http://www.mvps.org/vbnet/index.html...fouserinfo.htm

and I have run it on my machine , can someone tell me if this code is trying to get all groups in the domain or can I adapt this code to allow me to do this , the answer must be in an api call surely

many thx

Get Users Who Are Logged On?
Hello

I was wondering if anyone could point me in the right direction.
I need to search our local school network to check which users
are logged on. Its for a IM type system so i need to build a list of
logged on users so i know that they exist.

i was wondering if i would use api's to do the searching and to capture the
console output?
Im looking to do the searching in vb as i have the IM system partly build in java.
Anyone that could point me in the direction of some good book or sites that give a good lesson on the theory would be of great assistance

thank you.

Get Logged In Users Name
how can i get the logged in users name, not the username, i can get that, but just their name.

Thanks

Get All Logged On Users
Can anyone give me any ideas or examples as to how I can get the username of all logged on users on a network.

Thanks,

Jenova

Users Logged In NT
Hi Guys,

I would like to know whether it is possible to get all the users logged in the NT Network.
If Possible please provide me with the code.

This is very very urgent.
I have tried with some API's but n vain.

Thanx
minnal

Logged On Users
How can I get a list of the currently logged on users on Windows XP?

Show Currently Logged On Users
is ther any way of showing a list of the currently logged on users on windows NT??

Thanks in Advance

>>> Foxy <<<

Method To Verify What Users Are Logged?
Hello,


I have a VB-SQL application and i need to know if exists some method to check what users are connected...

Thanks for any help

VB Code To Find SQL Users Logged In
Hi all! I'm going to make this question kind of 2-fold in the event that someone has ALL the answers...

I have 1 VB6 program that imports data into a SQL database from our mainframe, and 1 VB6 program for our users that allow them to interact and edit data in the SQL database. The VB6 import program is scheduled to run during non-business hours; however, as I'm sure all are aware, there are times when it may need ran at other times. Here is the 2-fold question:

1. I'm trying to figure out how to code my import program to determine if there are any users logged into the SQL database.

2. If there are, then I would like to call a sub-routine in their VB program to display a message box asking them to exit...or maybe a net-send using their NT login...hmmm...any thoughts.

This might be 3-fold...

3. Can I also code my import program to kick any users out of the database if they are not logged off within a certain amount of time?

I am new with SQL security and its relation to multiple users with edit rights. I would like very much to learn more, so if anyone has any recommendations I would be forever grateful!

Thank you sooooo much!

Controling Then Number Of Users Logged
How can I know the number of users that have logged into a database.
I need to manage then Number of licenses.
thanks

------------------

Obtain Name Of Users In All Computers Currently Logged In.
hi frnds,

                 My requirement is to list the current computers connnected to the netqwork and the users on all those computers. I am using Windows 98 and VB 6.0. Can any body help ?


Regards Saneesh



Edited by - issacgeorge on 11/17/2004 9:17:27 AM

NT Users Logged In...Code People Have Wanted...Must See
So many people, including myself have asked how to check for users logged in. After many attempts I have found ways to do it, with help from others here.

I thought I'd share my code with you all, here goes:

Damn, posted the original thread in API forum

Here's the link:

http://www.vbforums.com/showthread.p...hreadid=147875

Netwrok Information: Users Logged In And PC Names
I have code, using API, which will allow me to view all users who have an NT account on our network. What I need to know is what PC they are logged into...

Does anyone know how to find a users PC name?

Has anyone got a spare fish?

Detecting Users Logged Into Access 2000
Hi all.

Anyone have any success detecting the users logged into Access 2000? I'm trying to use the MS FAQ #198755 without any success ... It is giving me the error "3251: Object or provider is not capable of performing the requested operation." This is my code:


Code:
Private Sub DetectButton_Click()
On Error GoTo Err_DetectButton_Click

Dim FormsConnect As ADODB.Connection

Set FormsConnect = New ADODB.Connection

FormsConnect.CursorLocation = adUseClient
FormsConnect.Open "DSN=Billing Forms;"

Set MyRecSet = FormsConnect.OpenSchema(adSchemaProviderSpecific, , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
While Not MyRecSet.EOF
MsgBox MyRecSet.Fields(0)
Wend
Set MyRecSet = Nothing
FormsConnect.Close
Set FormsConnect = Nothing

Exit_DetectButton_Click:
Exit Sub

Err_DetectButton_Click:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_DetectButton_Click
End Sub


Any ideas? Thanks.

- Mike

Users In A Domain
Hi guys,

I am looking at trying to get a list of all users currently logged into a domain. Any ideas on how this can be done??.

I have found one way of doing it by getting a list of all PC's in the domain, and then getting the username, but to do this, I have to be a local administrator on all of the machines - and i dont want to do this.

Thanks

Domain Users &amp; Groups
Hey guys.

I have an aplication that does alot of setting things up on the clients computer.
But I got stuck at this stage:

I need to take a group on the domain, and add it to the local administrator group, BUT with out the computer actually being in the domain.

can any one help?

Users Of NT Domain Groups
Hello All,

I'm looking for some help with determining whether a particular user is in an NT Domian Group.

e.g.

User1 logs into Domain1 is member of Project1_Group_Domain1
User2 logs into Domain1 is member of Project2_Group_Domain1

So I have code to determine the DomainName & UserName, but do not have code to say
e.g. is user1 member of Project1_Group_Domain1 of Domain1

Can anyone help...

GhostDog

Creating Domain Users
Does anyone know how to create domain users using LDAP provider with ADSI, rather than WinNT provider, so that you can modified the user's first name property?

Thanks

Check Users Permissions In Win NT/2k Domain
Is there any way possible to find out if a user has access (read, write permissions) to a network share in a Win NT/2000 domain? I know a work around (writing a file to the share and then deleting it means that the user has write access) but I’m looking for some VB solution.

Thank you

Retrieve Domain Information About App Users
I need to display data about the Users who have access to my application. I need to find a way to enter their UserName (known) and using that name, retrieve available information about them from the NT Domain.

I have come across ways to get current User information, but I am specifically looking to retrieve DOMAIN information about a specific user or users.

Any help would be greatly appreciated.



 

Users Looged Onto Windows NT Domain
Is there any API by which I can find out the Users who are logged onto a Windows NT Domain? If there is any code for this it would be really helpful.

Thanks
Partha

Script Newbie Need Help With Vbscript To Add Users To AD Domain
I'm trying to create a vbscript that will create a total of 100 user accounts with a specified generic password, add these accounts to a specified OU in Active directory, enable these accounts, and prompt the user to change the password on login. This is what I have so far:
Const ADS_UF_DONT_EXPIRE_PASSWD = &H10000
Const ADS_UF_PASSWD_CANT_CHANGE = &H0040
Const ADS_UF_ACCOUNTDISABLE = 2
Const ADS_ACETYPE_ACCESS_DENIED_OBJECT = &H6
Const ADS_ACEFLAG_OBJECT_TYPE_PRESENT = &H1
Const CHANGE_PASSWORD_GUID = "{ab721a53-1e2f-11d0-9819-00aa0040529b}"
Const ADS_RIGHT_DS_CONTROL_ACCESS = &H100

Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("F:scriptsaddusers.txt", 1)
strUserCount = 0
do until objFile.AtEndOfStream
strcn = objFile.Read(8)
objFile.Skip(1)
strsam = objFile.Read(8)
objFile.Skip(1)
strpasswd = objFile.Read(9)
objFile.SkipLine

'CREATE USER AND SET PASSWORD
Set objOU = GetObject("LDAP://ou=User Accounts, dc=tus002, dc=sitest, dc=net")
Set objUser = objOU.Create("User", "cn=" & strcn )
objUser.Put "sAMAccountName", strsam
objUser.Put "pwdLastSet", -1
ObjUser.SetInfo
objUser.SetPassword strpasswd

'ENABLE ACCOUNT
Set objUser = GetObject ("LDAP://cn=" & strcn & ", ou=User Accounts, dc=tus002, dc=sitest, dc=net")
intUAC = objUser.Get("userAccountControl")
objUser.Put "userAccountControl", intUAC XOR ADS_UF_ACCOUNTDISABLE
objUser.SetInfo

'SET PASSWORD TO NOT EXPIRE
Set objUser = GetObject ("LDAP://cn=" & strcn & ", ou=User Accounts, dc=tus002, dc=sitest, dc=net")
intUAC = objUser.Get("userAccountControl")
objUser.Put "userAccountControl", intUAC XOR ADS_UF_DONT_EXPIRE_PASSWD
objUser.SetInfo

'SET USER CAN NOT CHANGE PASSWORD
Set objUser = GetObject ("LDAP://cn=" & strcn & ", ou=User Accounts, dc=tus002, dc=sitest, dc=net")
Set objSD = objUser.Get("ntSecurityDescriptor")
Set objDACL = objSD.DiscretionaryAcl
arrTrustees = array("nt authorityself", "EVERYONE")

For Each strTrustee in arrTrustees
Set objACE = CreateObject("AccessControlEntry")
objACE.Trustee = strTrustee
objACE.AceFlags = 0
objACE.AceType = ADS_ACETYPE_ACCESS_DENIED_OBJECT
objACE.Flags = ADS_ACEFLAG_OBJECT_TYPE_PRESENT
objACE.ObjectType = CHANGE_PASSWORD_GUID
objACE.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objDACL.AddAce objACE
Next

objSD.DiscretionaryAcl = objDACL
objUser.Put "nTSecurityDescriptor", objSD
objUser. SetInfo
strUserCount = strUserCount + 1
loop
objFile.Close
Wscript.echo strUserCount & " Users have been created"

I just added the options to enable the accounts and apply a password, but I can't get it to work. I know the accounts get created and added to Active Directory but I'm unsure of how to trouble this. I'm new and basically following a page at MS.
Any help on this is appreciated.

Add Users To Domain User Groups With ADSI
Does anyone know how to add users to usergroups using ADSI? I haveevery other piece of information but the right commands to add this user. Thanks,

Juan Torres
Blue Cross Blue Shield of Florida
Configuration Management & Distribution Solutions

Domain Based Users - Program Cannot Insert Or Update A Record
Hi guys,

I would like to ask for your help because my problem is freaking me out...

I have this application written in vb6. This app connects to the SQL server 2k complete with the latest SPs. The SQL server is installed in NT 4 server, also with the latest updates. Usually, our SYSADMIN updates our machines everytime there's an update available from Microsoft.

My application was written at home on a win2k pro machine(stand alone) with SP3,vb sp5 and mdac 2.8. I tested my app before delivering at it was fine. I tested it on XP and it worked fine after I register some DLLs manually.

The problem I have is on the networked environment. The users on this network is on, let's say, domain A. So users are actually created on the NT server. A PC local account(ordinary not admin) is also different. When I connect to the database, I get this error that I'm not allowed to update the database when I try to update a value. I also unable to insert a record but I can read the records. I already set the permissions for the database user.

My additional questions are:

1. Do I need to specify a (SQL) user name on my ado connection string. Is this better than using trusted connection? Security wise, I know this is better.

2. Is having multiple domains affects the read write process of the SQL server? I think the sysADMIN wants to integrate the domain user account to the SQL user accounts.

And one more thing. Why is it that in my app, datagrids of my app installed on XP machines can show the records and those in win 2k cannot? I copied and registered the DLLs from my XP machine to WIN2K pro and it is still not working. MS Visual Studio Installer should copy and register DLLs for us, shouldn't it?

Thanks a lot!

Regards,

List Of Workstations On A Domain
Is there an API Function that will return me a list of workstations that are registered on a domain. If there is can someone please let me know what it is, if there isnt, is there another way of finding this out

Thanks

How To Get NT Domain Members List
on an NT4.0 domain, how would i go about getting a list of all domain members?

is there a simple way to do this?

i need to generate a list within a program, which the user can view and select particular domain memebers to perform operations on...

i apologize if this is a question that has been answered a million times...i am new to VB...

just a push in the right direction would be helpful...

TIA

Add Domain List To A Listbox
I am looking for a code of adding the Network Neighborhood domain stations/PC's to a Listbox in Visual Basic,,Any Help is appreciated.

List Of Addresses In Domain From DNS Server?
Is it possible to get a list of addresses in a domain from a DNS server in VB6? Every DNS example I've found so far appear to resolve only one hostname at a time, and shelling an NSLOOKUP.EXE window is too difficult (for me) since the LS command is only available in interactive mode (I was going to redirect output to text file and read it). Any suggestions?

WacoFishMan

Populate A List Box With All Computers On A Domain
When my form loads i would like it to have a listbox with each item the name of each computer present on a LAN. Am fairly new to this type of coding so not much of an idea personally.

Help appreciated, cheers

Enumerating/retrieving A List Of Available SQL Servers On A Domain
Hey folks,

I need some help in recalling how to retrieve a list of the available SQL Servers on a network. Its been a few years since I've worked with VB6, but I believe it was done with an API call. Ideally, I'd like to populate a combobox with the list. Any help would be appreciated.


Codito Ergo Sum...
Erich Karch :
"A government is a body of people, usually notably ungoverned."

List Of Users
Ok i am looking for a way to get a list of all local users on a Pc, must work on all 9X machines 2000/XP

There is always the obvious, yet wasteful method of enumerating the folders in Documents and Settings/Profiles folder but I was hoping that there was a better way. Any ideas?

List Of Users
hi is it possible to get a list of all the users on a networkand passwords... i'm making a logon with vb for my friends network( i know it sounds stupid but thats what he wants) and i'm not sure how i could a)get a list of users and passwords using vb and b) have it when you click logon it looks through the list of users to see if its a valid user and password

Get List Of All Users On XP/NT?
I foudn out how to get the current user with GetUserName API call the other day - is there a way to get a list of all available users on the computer and fill a listbox with them using API or some other easy call?

Thanks alot!

Users List
I am sure that this has been posted before, however I have been searching all morning and can not find it.

I am looking for a way to get a list of all users. I would like to be able to get a list for both the local machine as well as the network and be able to differentiate between the two, however the main thing I really need now is a list of local users.

Copyright © 2005-08 www.BigResource.com, All rights reserved