LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how can i scan for samba shares (https://www.linuxquestions.org/questions/linux-networking-3/how-can-i-scan-for-samba-shares-876721/)

baronobeefdip 04-23-2011 07:18 PM

how can i scan for samba shares
 
what id the way you scan for samba shares through command line, do i need samba to be installed to do it

Telengard 04-23-2011 07:40 PM

Quote:

Originally Posted by baronobeefdip (Post 4333982)
what id the way you scan for samba shares through command line, do i need samba to be installed to do it

Code:

smbtree -N
You do need the Samba client software installed. I don't think the server is required for this to work.

baronobeefdip 04-24-2011 06:45 PM

does this work in FreeBSD

Telengard 04-24-2011 08:31 PM

Quote:

Originally Posted by baronobeefdip (Post 4334936)
does this work in FreeBSD

Wait, isn't this the Linux Networking forum? Yeah, it is :P

Dunno, I don't have a FreeBSD box to play with here. I assume Samba works pretty much the same on any system though. Can you try it to find out?

baronobeefdip 04-25-2011 07:31 AM

sorry should've started a new thread in the BSD forum

baronobeefdip 05-12-2011 07:59 PM

well how do i scan the work group since the
Code:

smbtree -N
command will only give me the shares that are on the machine that i am using not on all the other one of a specific work group or LAN, how do you scan for shares in a worgroup

plus on other machines that i am not using as a server the commands that i am using are all not found
smbclient
smbtree
smbmount

remember i am using debian squeeze, not ubuntu. before someone sends me a solution that applies only to ubuntu

---------- Post added 05-12-11 at 07:59 PM ----------

well how do i scan the work group since the
Code:

smbtree -N
command will only give me the shares that are on the machine that i am using not on all the other one of a specific work group or LAN, how do you scan for shares in a worgroup

plus on other machines that i am not using as a server the commands that i am using are all not found
smbclient
smbtree
smbmount

remember i am using debian squeeze, not ubuntu. before someone sends me a solution that applies only to ubuntu

Telengard 05-13-2011 09:21 AM

Quote:

Originally Posted by baronobeefdip (Post 4354830)
remember i am using debian squeeze, not ubuntu. before someone sends me a solution that applies only to ubuntu

The Samba command line tools are not specific to Ubuntu. They are specific to Samba.

If the smbtree command doesn't list SMB hosts on your LAN then either or:
  • something is configured wrong
  • there are none to list

I strongly recommend reading the documentation of your distro. You might start with the man pages.

Edit

http://www.samba.org/samba/docs/man/...smbtree.1.html

Here are the parts relevant to the command I suggested.

Quote:

Originally Posted by man smbtree
...
smbtree — A text based smb network browser
...
This tool is part of the samba(7) suite.

smbtree is a smb browser program in text mode. It is similar to the "Network Neighborhood" found on Windows computers. It prints a tree with all the known domains, the servers in those domains and the shares on the servers.
...
-N|--no-pass

If specified, this parameter suppresses the normal password prompt from the client to the user. This is useful when accessing a service that does not require a password.

Unless a password is specified on the command line or this parameter is specified, the client will request a password.

If a password is specified on the command line and this option is also defined the password on the command line will be silently ingnored and no password will be used.

HTH

baronobeefdip 05-19-2011 07:25 PM

i know that this thread has been resolved already but for some reason, my latest installation of samba on a box i recently set up tells me that the smbtree command can't be found. what's going on here? what isn't the command there

gdm 08-27-2012 02:57 PM

nbtscan
 
I realize this is an old thread, but here is what I used.

nbtscan 192.168.1.0/24

baronobeefdip 08-27-2012 03:30 PM

I just used nmap even thought there more advanced content and makes it a little harder to find a share but it worked for me.


All times are GMT -5. The time now is 06:21 PM.