The smbclient command line application included in Backtrack Linux is a staple for pentesting. I would imagine anyone that has done a pentest has used it to quickly verify SMB (Server Message Block) or CIFS (Common Internet File System) shares. The smbclient manpage describes it as a FTP-like client to access SMB/CIFS resources on servers. Below we describe varios smbclient commands in details to provide a basic understanding of its capabilities and what output will look like when using this tool in Backtrack Linux.
In the Backtrack menu under Information Gathering > Network Analysis > SMB Analysis there is a menu item named smbclient which should actually be named smbclient.py. While the smbclient.py script does actually use smbclient it provides a different interface, commands, no switches, etc. making it fairly different than smbclient itself. While both smbclient and smbclient.py are supposed to provide the same end results they don’t because smbclient.py is extremely buggy so I will be writing an article on each so there is no confusion.
smbclient Backtrack Linux – sh: line 0: cd: /pentest/python/impacket-examples/: No such file or directory
When attempting to launch smbclient via the Backtrack menu in Backtrack Linux version 5 release 3 you will receive an error stating there is no such file or directory. It appears some of the paths have changed between Backtrack Linux releases and the menu item for smbclient was not updated. I personally prefer smbclient from the command line however if you like the smbclient.py python script then fixing it is easy as noted in the details below.