-
Have you ever wanted to check whoâs online right now, if thereâs any suspicious movement happening on your cloud?
-
Similar to unix who, follow live who is logged in with
â nc-who
â
I have completely reworked this script, which was originally created here
It has a completely revised output. Since it updates at an adjustable refresh rate with watch
, the formatted output from mysql was no longer usable. The solution was to output as html and back with html2text and sed in a usable, nice and neat format.
Nextcloud All-in-One is supported, containerized solutions other than AIO are not (yet) supported
This tool is primarily intended for administrators of Nextcloud instances with many users. Of course, this is not intended for small servers used in familiary circles. But they can also want to take a look and then the tool is not far:
Restriction: only for MySQL/MariaDB Supported databases: MySQL/MariaDB, PostgreSQL
This script was created with â ebtb â .
Install this way:
sudo wget -qO /usr/local/bin/nc-who https://global-social.net/script/nc-who
sudo chmod +x /usr/local/bin/nc-who
nc-who
Explanation:
- the first line downloads the script into the directory /usr/local/bin
- the second line makes it executable
You only need to install it once.
As all of my â ebtb â scripts, it comes signed and does an integrity check on the first run and checks for updates on every startup.
Simply run:
nc-who monitor
or
nc-who last
There is a âgod modeâ. Example screen:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
This is the GOD MODE of nc-who.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I: Here you can invalidate cookies before they expire by deleting the corresponding authtoken from the
database.
â : The user whose authtoken is deleted, thereby invalidating their cookie, must log in again using their
credentials and, if configured, a second factor. An ongoing session will also be closed. Error
messages may occur if the user continues to attempt to retrieve new data, so use this feature only
after careful consideration.
If you enter the full word panic , all cookies will be invalidated and all users will have to log in
again.
This applies only to cookie-based browser connections; connections using app tokens are not affected.
+-----------------------------------------------------------------------------------------------------------------+
| pos | last_activity | status | uid | client |
+-----+---------------------+--------+----------------+-----------------------------------------------------------+
| | | | | Mozilla/5.0 |
| 1 | 2025-04-02 17:28:35 | online | Long_User_Name | (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 |
| | | | | (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 |
| | | | | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/ |
| 2 | 2025-04-02 17:28:02 | online | user | 537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/ |
| | | | | 537.36 OPR/117.0.0.0 |
| 3 | 2025-04-02 17:27:26 | away | user | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/ |
| | | | | 537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 |
| | | | | Mozilla/5.0 |
| 4 | 2025-04-02 12:08:50 | away | Long_User_Name | (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/ |
| | | | | 605.1.15 (KHTML, like Gecko) CriOS/134.0.6998.99 Mo... |
Please select:
[pos] - pos number from the authtoken you want to invalidate
panic - invalidate all cookie based tokens
[ b ] - go back to selection
[ q ] - quit
Enter [pos], panic , [ b ] or [ q ]:
much luck with it.
ernolf
==========================================
- PayPal:
PayPal.Me @ernolf - Github Sponsors:
Github Sponsors @ernolf - Bitcoin to
bc1qwlcqc7zsak45vwqk0dt7hnxlrta7syzstgf7t8
- Ethereum, BNB Smart Chain, Polygon to
0x72b7901b3daa45a7266A77Aa3B3552aB686d0D0D
- Solana to
E7e13hBB7rmhY2N1MqAY88TKobBktJA7rSpTZWAPec6Y
==========================================