[Samba] Get number of current logged on users

Adam Tauno Williams adamtaunowilliams at gmail.com
Thu Jan 31 16:19:43 GMT 2008


> >> I'm looking for a simple way to get the number of current logged on
> >> users (with established sessions) to measure the use frequency of our
> >> student labs. I don't need to identify the users.
> > sardine:~ # expr `smbstatus -b | cut -c35-45 | sort | uniq | wc -l` - 3
> > 151
> I've tried it and it seems the columns are slightly wrong...
> serverlinux backup # smbd --version
> Version 3.0.24
> The cut parameters should be:
> cut -c36-49

Yep, it is rather squishy, and a generally crappy solution but it is the
only one I've found.  Maybe someday the Samba4/Python stuff or MMC
support will provide a "real" solution.

-- 
Adam Tauno Williams, Network & Systems Administrator
Consultant - http://www.whitemiceconsulting.com
Developer - http://www.opengroupware.org



More information about the samba mailing list