Show connection in ps

Ken Cross kcross at nssolutions.com
Wed Apr 30 17:56:23 GMT 2003


??  It just shows the machine and user, no shares.  Or am I
misunderstanding your question?

Ken
________________________________

Ken Cross

Network Storage Solutions
Phone 865.675.4070 ext 31
kcross at nssolutions.com 

> -----Original Message-----
> From: 
> samba-technical-bounces+kcross=nssolutions.com at lists.samba.org
>  
> [mailto:samba-technical-bounces+kcross=nssolutions.com at lists.s
> amba.org] On Behalf Of Green, Paul
> Sent: Wednesday, April 30, 2003 1:52 PM
> To: 'Ken Cross'; 'Andrew Bartlett'
> Cc: 'Multiple recipients of list SAMBA-TECHNICAL'
> Subject: RE: Show connection in ps
> 
> 
> Are there any security issues with this?  It is possible to 
> define hidden, non-browseable shares in Samba, but won't this 
> publish them for all to see? Can you find this bit and check 
> it before publishing them to ps?
> 
> Thanks
> PG
> 
> -----Original Message-----
> From: Ken Cross [mailto:kcross at nssolutions.com]
> Sent: Wednesday, April 30, 2003 12:57 PM
> To: 'Andrew Bartlett'
> Cc: 'Multiple recipients of list SAMBA-TECHNICAL'
> Subject: RE: Show connection in ps
> 
> 
> Yeah, it ain't perfect, but it's still more interesting than 
> "smbd -D".
> 
> Like I said, it's in the "just for fun" department, hence low 
> (~zero?) priority.
> 
> Ken
> ________________________________
> 
> Ken Cross
> 
> Network Storage Solutions
> Phone 865.675.4070 ext 31
> kcross at nssolutions.com 
> 
> > -----Original Message-----
> > From: Andrew Bartlett [mailto:abartlet at samba.org]
> > Sent: Wednesday, April 30, 2003 10:30 AM
> > To: David Collier-Brown -- Customer Engineering
> > Cc: Ken Cross; 'Multiple recipients of list SAMBA-TECHNICAL'
> > Subject: Re: Show connection in ps
> > 
> > 
> > On Wed, 2003-04-30 at 23:33, David Collier-Brown -- Customer
> > Engineering
> > wrote:
> > > That's lovely!!!
> > 
> > Except that you can't assume one user per connection, nor one
> > share per connection...
> > 
> > I'll accept one that triggers on setting the remote machine
> > name, but that's mostly stuck in library code, so not as easy 
> > to get...
> > 
> > > Ken Cross wrote:
> > > > Samba-folk:
> > > > 
> > > > In the "just for fun" department...
> > > > 
> > > > Something I've found very handy is the ability to 
> quickly see all
> > > > the connections using "ps -ax":
> > > > 
> > > >  2442 S  0:00.04 smbd: kjcwinxp (10.0.0.189) 
> WIN2DOM\cross  2693 S  
> > > > 0:00.07 smbd: win2 (10.0.0.205) WIN2DOM\Administrator  3016 S  
> > > > 0:00.05 smbd: nt4srv (10.0.0.197) WIN2DOM\User2  5239 
> Ss 0:00.08 
> > > > /usr/pkg/sbin/smbd -D
> > > > 
> > > > It's not as comprehensive as smbstatus, but it's less 
> boring than
> > > > hundreds of lines of "smbd -D".  I added this line:
> > > > 
> > > >  setproctitle( "%s (%s) %s", get_remote_machine_name(),
> > > > conn->client_address, user );
> > > > 
> > > > at the end of make_connection_snum in smbd/service.c.
> > > > 
> > > > Ken
> > > > ________________________________
> > > > 
> > > > Ken Cross
> > > > 
> > > > Network Storage Solutions
> > > > Phone 865.675.4070 ext 31
> > > > kcross at nssolutions.com
> > > > 
> > > > 
> > > 
> > > 
> > > -- 
> > > David Collier-Brown,           | Always do right. This 
> will gratify
> > > Sun Microsystems DCMO          | some people and astonish 
> the rest.
> > > Toronto, Ontario               |
> > > (905) 415-2849 or x52849       | davecb at canada.sun.com
> > -- 
> > Andrew Bartlett                                 abartlet at pcug.org.au
> > Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
> > Student Network Administrator, Hawker College   abartlet at hawkerc.net
> > http://samba.org     http://build.samba.org     http://hawkerc.net
> > 
> 



More information about the samba-technical mailing list