Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
Users online
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
How many lines is too man...
by
Martin_fr
[
Today
at 10:23:23 am]
The growth of computers
by
marcov
[
Today
at 10:12:39 am]
Hello! Anything new?
by
440bx
[
Today
at 09:27:13 am]
could Ardour's YTK be use...
by
robert rozee
[
Today
at 08:26:10 am]
Questions about TFuncSeri...
by
hedgehog
[
Today
at 08:19:43 am]
Update a table with an Au...
by
Zvoni
[
Today
at 08:08:47 am]
Configuration issues rega...
by
Martin_fr
[
Today
at 08:05:38 am]
[SOLVED] TCP/IP Question
by
valdir.marcos
[
Today
at 05:03:12 am]
Update fpexprpars
by
valdir.marcos
[
Today
at 04:52:27 am]
C/C++ code to Object Pasc...
by
Curt Carpenter
[
Today
at 03:58:28 am]
Win 11, strange position ...
by
d7_2_laz
[March 08, 2026, 11:13:04 pm]
Lazarus for Windows on aa...
by
msintle
[March 08, 2026, 09:23:01 pm]
Lazarus Bugfix Release 4....
by
Martin_fr
[March 08, 2026, 08:17:00 pm]
Debian removes FPC/Lazaru...
by
Schmitty2005
[March 08, 2026, 07:56:33 pm]
[SOLVED] ??? I don't even...
by
n7800
[March 08, 2026, 07:29:19 pm]
how to rename/save a seco...
by
valdir.marcos
[March 08, 2026, 07:25:59 pm]
Set horizontal scroll pos...
by
rvk
[March 08, 2026, 07:17:42 pm]
How to run an external co...
by
valdir.marcos
[March 08, 2026, 07:07:31 pm]
Qt6/Wayland clipboard: pa...
by
Fred vS
[March 08, 2026, 07:02:05 pm]
NIL vs. Assign: when to u...
by
valdir.marcos
[March 08, 2026, 06:22:05 pm]
lazarus in new england
by
valdir.marcos
[March 08, 2026, 06:10:02 pm]
Text Fill (Memo)
by
Sc0li0sis
[March 08, 2026, 02:36:32 pm]
[Closed]Canvas.StretchDra...
by
jamie
[March 08, 2026, 01:57:10 pm]
Amigo programming languag...
by
paxscript
[March 08, 2026, 12:21:59 pm]
[SOLVED] The "dockedforme...
by
jamie
[March 08, 2026, 10:50:42 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Users online (Read 9467 times)
xinyiman
Hero Member
Posts: 2261
Users online
«
on:
March 30, 2011, 09:30:18 am »
Hello everyone. How do I know the username of users attached to a particular machine? There is a dedicated protocol to do this? How can I get the user name and the date on which it is authenticated on that machine? Thanks for you help.
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
LazaruX
Hero Member
Posts: 597
Lazarus original cheetah.The cheetah doesn't cheat
Re: Users online
«
Reply #1 on:
March 30, 2011, 09:34:43 am »
Which Operating System?
Does "Environment Variables" help?
If on Windows maybe through WMI you can get this info, I doubt about the date.
Logged
xinyiman
Hero Member
Posts: 2261
Re: Users online
«
Reply #2 on:
March 30, 2011, 09:42:13 am »
In theory I do it for Windows, Linux and AS400. But I could already there for Windows and Linux I'd be happy.
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
fabienwang
Sr. Member
Posts: 449
Lazarus is the best
Re: Users online
«
Reply #3 on:
March 30, 2011, 12:39:43 pm »
you can use:
GetEnvironmentVariable('USER');
it will work on any platform.
For the date of authentification, please look at the users unit in the users fpc package, you'll find interesting functions like GetUserList, GetUserData, GetUserUID etc.
Logged
I'm using
Arch Linux
.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint
xinyiman
Hero Member
Posts: 2261
Re: Users online
«
Reply #4 on:
March 30, 2011, 01:13:31 pm »
Ok, however, via either the environment variables do I know what all users are authenticated and what time? It's not that I will only return my username?
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
fabienwang
Sr. Member
Posts: 449
Lazarus is the best
Re: Users online
«
Reply #5 on:
March 30, 2011, 01:15:26 pm »
no, GetEnvironmentVariable('USER'); will give the current user you're logged in with.
To get the list of users in the system, and get more infos about them (like if they're connected, how long etc.) you have to see the users unit in the FPC/Units folder.
Logged
I'm using
Arch Linux
.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint
xinyiman
Hero Member
Posts: 2261
Re: Users online
«
Reply #6 on:
March 30, 2011, 01:59:39 pm »
I'm on windows and I can not find the folder users
C:\lazarus\fpc\2.4.2\units\i386-win32
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
fabienwang
Sr. Member
Posts: 449
Lazarus is the best
Re: Users online
«
Reply #7 on:
March 30, 2011, 02:02:03 pm »
add users in the uses of your form.
Put your mouse over it and Ctrl + Click, you should be in the users unit
PS: it seems to be for linux only.
«
Last Edit: March 30, 2011, 02:10:19 pm by FabienWang
»
Logged
I'm using
Arch Linux
.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint
xinyiman
Hero Member
Posts: 2261
Re: Users online
«
Reply #8 on:
March 30, 2011, 03:02:20 pm »
And if you recover your username, how do I know what kind of user? For example, if I discover as administrator or root
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
fabienwang
Sr. Member
Posts: 449
Lazarus is the best
Re: Users online
«
Reply #9 on:
March 30, 2011, 03:28:41 pm »
for Linux you could get the user groups and if he is in admins or root groups, then it's an admin, if not, he's a simple user.
Logged
I'm using
Arch Linux
.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint
xinyiman
Hero Member
Posts: 2261
Re: Users online
«
Reply #10 on:
March 30, 2011, 03:33:23 pm »
How do I know the user's group by lazarus on Linux?
And on windows? Ideas?
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
Users online
TinyPortal
© 2005-2018