Koozali.org: home of the SME Server

Users logged in

Trampas

Users logged in
« on: June 27, 2002, 06:55:30 PM »
I am often rebooting the server as I get it configured. I was wondering if their was a way to determine the users which are currently logged in? I was also wondering if their was a way to send them a message that the server would be reboot, that would work with linux and windows workstations?

Thanks

Nathan Fowler

Re: Users logged in
« Reply #1 on: June 27, 2002, 09:38:49 PM »
At the console, as root, type 'w'

[root@inet01 /root]# w
 11:38am  up 4 days, 17:38,  1 user,  load average: 0.00, 0.02, 0.05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
root     pts/1    connectandcreate 11:38am  0.00s  0.10s  0.04s  w


To send all users a message type "wall"
[root@inet01 /root]# wall "Hey folks, I'm going to reboot the server now!"
[root@inet01 /root]#
Broadcast message from root (pts/1) Thu Jun 27 11:38:29 2002...

Hey folks, I'm going to reboot the server now!


Hope this helped,
Nathan

Trampas

Re: Users logged in
« Reply #2 on: June 27, 2002, 09:45:49 PM »
Nathan,

Thanks for the reply. I did a "w" on my system where I was logged into the domain using a win2k box. However the w command only showed that root was logged in. Is their an easy way to show the which users have logged into the server through the primary domain or are currently accessing the file system?

Thanks again

Nathan Fowler

Re: Users logged in
« Reply #3 on: June 27, 2002, 09:50:10 PM »
That information changes things significantly.  I thought you meant users physically logged into the machine, not accessing it via Samba.

To watch connections, you should get a utility called "Netwatch.exe" in the NT Resource kit.  Point it to \.  You should be able to see open files, users, etc.  This is untested so I'm not sure if it will work with Linux Samba.

To send a message to those users connected to the network, if the clients are Windows 95/98, you can't.  The Network Messenger service does not exist.

For those machines that are NT based (NT/2000/XP) you can from your machine type 'net send /domain: "Hello, I think I'll reboot the server now"' or to send to everyone, 'net send * "Hello I think I'll reboot now".'

Hope this helped,
Nathan