Fun with smbclient

October 14th, 2013

SMB runs on Windows networks and provides file and printer sharing services across the LAN. A Unix implementation exists, known as “Samba”. Let’s use smbtree, a text based smb network browser. Here, we’ll use flags -b and -U. -b will query nodes through broadcast rather than the local master browser. -U sets a username to be used on the network to query. A password will be prompted for. We’ll use:

smbtree -b -U adam
smbtree

smbtree

Now, let’s see about accessing the ‘J’ drive on ‘//ADAM-PC’. We’ll use:

smbclient -U adam //ADAM-PC/J
smbclient

smbclient

Now that we are connected, we have a whole range of transfer and status commands at our disposal. Let’s transfer a file with ‘get’:

smbclient get

smbclient get