finger/rhosts type utility?

Iain Rae iainr at civ.hw.ac.uk
Thu Nov 16 16:38:45 GMT 2000


> > 
> > > doesn't    'smbstatus'   do this for you?
> > >
> > >
> > 
> > yes and no, I want to have our print server send a winpopup if there is
> > a problem with a print job when it hits the printer (wrong paper size
> > etc) but only if the user is still logged on, otherwise someone else is
> > going to get confused. Smbstatus seems to drop information about print
> > shares around 10 minutes after the last print job has been made, it also
> > shows people as using shares after they've logged out.
> 
> If you're looking for an NT user called fred, then:-
> 
> nmblookup -S "fred#03" | awk '/<00> -  /{print $1}'
> 
> will give you the workstation that fred is logged into. It should be
> fairly simple to work that into a script that uses "smbclient -M" to
> send a winpopup to the appropriate machine, if it's found.
>
And the god's continue to conspire against me, I'm using cvs code from
the 2.2.0 branch as a PDC and whilst this'll work for machine accounts
it won't work for domain accounts.

i.e. local account

 nmblookup -S rm323bn                               
querying rm323bn on X.X.X.255
X.X.X.X rm323bn<00>
Looking up status of x.X.X.X
received 6 names
	RM323BN         <00> -         M <ACTIVE> 
	CV307           <00> - <GROUP> M <ACTIVE> 
	RM323BN         <20> -         M <ACTIVE> 
	RM323BN         <03> -         M <ACTIVE> 
	CV307           <1e> - <GROUP> M <ACTIVE> 
	Administrator   <03> -         M <ACTIVE> 
num_good_sends=0 num_good_receives=0

with me logged in


 nmblookup -S rm323bn
querying rm323bn on X.X.X.255
X.X.X.X rm323bn<00>
Looking up status of X.X.X.X
received 5 names
	RM323BN         <00> -         M <ACTIVE> 
	CV307           <00> - <GROUP> M <ACTIVE> 
	RM323BN         <20> -         M <ACTIVE> 
	RM323BN         <03> -         M <ACTIVE> 
	CV307           <1e> - <GROUP> M <ACTIVE> 
num_good_sends=0 num_good_receives=0





 Curiously it's the same for Hummingbird's fingerd daemon.

I'll try taking this to samba-ntdom.

 
> HTH
> 

thanks.
> Mike.

-- 
Iain Rae
Computing Officer
Dept. Civil & Offshore Engineering
Heriot-Watt University




More information about the samba mailing list