Operating System - HP-UX
1756709 Members
2591 Online
108852 Solutions
New Discussion юеВ

Re: list active samba users/shares?

 
SOLVED
Go to solution
Doug O'Leary
Honored Contributor

list active samba users/shares?

Hey;

I have a 11.11 system running the cifs server, set up by someone else as I know next to nothing about cifs/samba. Based on what I'm seeing in the smb.conf file, I'm assuming this server isn't being used and I'd like to shut it down.

Is there a way to identify if any shares are being actively used? Or if users are logging in?

Any info would be greatly appreciated.

Thanks.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: list active samba users/shares?

Shalom,

Few ways to do this.

http://www.cyberciti.biz/tips/howto-find-for-available-smb-shares.html

smbclient followed by a login to the samba server will list shares.

smbclient -L jumbo -Uusername -I ip-address

On HP-UX you may need to use cifsclient. No HP boxes in my house to check.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: list active samba users/shares?

I'm really sorry for splitting the post.

I've been doing that a lot lately and its probably because I'm having a hard time concentrating.

http://docs.hp.com/en/B8725-90133/index.html

This link is really good and includes some monitor commands.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Doug O'Leary
Honored Contributor

Re: list active samba users/shares?

Hey;

Thanks for the reply. I have the smbclient command to list the available shares; I'm looking to find a way to identify *active* shares.

The reason I suspect this service isn't being used is that, every where else it's used, there are a variety of share names. On this particular box, I have the generic stanzas in the smb.conf file:

# sed -n -e '/^\[/,/^$/p' smb.conf
[global]

[homes]
comment = Home Directories
browseable = no

[tmp]
comment = Temporary file space
path = /tmp
read only = no

I'd like a command to validate that no one is actually using these shares. There is always the 'turn it off and see who screams' approach, but my client is somewhat gun shy.

Thanks again.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Jeff_Traigle
Honored Contributor
Solution

Re: list active samba users/shares?

No need for client software...

/opt/samba/bin/smbstatus

Lists defined shares, what systems are connected to which shares, and any locked files people are using.
--
Jeff Traigle
Doug O'Leary
Honored Contributor

Re: list active samba users/shares?

Outstanding, sir! Thank you very much. Exactly what I was looking for.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html