Closed r4ph43l-GitHub closed 9 years ago
@r4ph43l-GitHub : Can you provide more information on your distro and Samba version?
Sure,
Sorry, took a sec - 3:30 am over here..
Clients are running latest pysmb, both, Win7 and Kali Linux distribution running python2.7 affected. Connection to shares looks ok, given the share name, they can be browsed and accessed without errors, only thing not running fine is listShares -
[...] def init(self,username, password, client_name, server_name, server_ip, shared_folder=None):
self.conn = SMBConnection(username, password, client_name, server_name, use_ntlm_v2 = False)
self.shared = shared_folder
assert self.conn.connect(server_ip, 139)
[...] def listShares(self): self.__ServerShares=[] if self.conn: print(self.conn) for dev in self.conn.listShares(): print(dev) if dev.type == SharedDevice.DISK_TREE: self.ServerShares.append(dev.name) return self.ServerShares [...]
// End of Code Snippets //
288/924MB 0.00 0.01 0.05 1/125 11062root /etc/samba # /usr/bin/smbd -V Version 4.2.0
smb.conf (exctracts):
[global]
; workgroup = MYGROUP
server string = uname -n
printcap name = /dev/null load printers = no
printing = bsd
disable spoolss = yes
log file = /var/log/samba/%m.log
max log size = 50
security = user
dns proxy = no
allow nt4 crypto = yes require strong key = no
// End smb.conf_global //
OperationFailure: Failed to list shares: Unable to retrieve shared device list ==================== SMB Message 0 ====================
Command: 0x03 (SMB2_COM_TREE_CONNECT) Status: 0x00000000 Flags: 0x00 PID: 6252 MID: 3 TID: 0 Data: 36 bytes 0900000048001c005c005c0041004c00410052004d00500049005c004900500043002400
fe534d42400000000000000003000000000000000000000003000000000000006c1800000000000057cfad4d00000000000000000000000000000000 000000000900000048001c005c005c0041004c00410052004d00500049005c004900500043002400 ==================== SMB Message 1 ====================
Command: 0x03 (SMB2_COM_TREE_CONNECT) Status: 0x00000000 Flags: 0x01 PID: 6252 MID: 3 TID: 1026590178 Data: 16 bytes 100002000000000000000000a9001f00
fe534d42400000000000000003000100010000000000000003000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 00000000100002000000000000000000a9001f00 ==================== SMB Message 2 ====================
Command: 0x05 (SMB2_COM_CREATE) Status: 0x00000000 Flags: 0x00 PID: 6252 MID: 4 TID: 1026590178 Data: 68 bytes 3900000002000000000000000000000000000000000000009f0112000000000007000000010000004000400078000c00000000000000000073007200 7600730076006300
fe534d42400000000000000005000000000000000000000004000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 000000003900000002000000000000000000000000000000000000009f0112000000000007000000010000004000400078000c000000000000000000 730072007600730076006300 ==================== SMB Message 3 ====================
Command: 0x05 (SMB2_COM_CREATE) Status: 0x00000000 Flags: 0x01 PID: 6252 MID: 4 TID: 1026590178 Data: 88 bytes 590000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000 000000003de8b73100000000716656fc000000000000000000000000
fe534d42400000000000000005000100010000000000000004000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 000000005900000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 80000000000000003de8b73100000000716656fc000000000000000000000000 ==================== SMB Message 4 ====================
Command: 0x09 (SMB2_COM_WRITE) Status: 0x00000000 Flags: 0x00 PID: 6252 MID: 5 TID: 1026590178 Data: 164 bytes 310070007400000000000000000000003de8b73100000000716656fc000000000000000000000000000000000000000005000b031000000074000000 02000000b810b810000000000200000000000100c84f324b7016d30112785a47bf6ee18803000000045d888aeb1cc9119fe808002b10486002000000 01000100c84f324b7016d30112785a47bf6ee188030000002c1cb76c12984045030000000000000001000000
fe534d42400000000000000009000000000000000000000005000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 00000000310070007400000000000000000000003de8b73100000000716656fc000000000000000000000000000000000000000005000b0310000000 7400000002000000b810b810000000000200000000000100c84f324b7016d30112785a47bf6ee18803000000045d888aeb1cc9119fe808002b104860 0200000001000100c84f324b7016d30112785a47bf6ee188030000002c1cb76c12984045030000000000000001000000 ==================== SMB Message 5 ====================
Command: 0x09 (SMB2_COM_WRITE) Status: 0x00000000 Flags: 0x01 PID: 6252 MID: 5 TID: 1026590178 Data: 16 bytes 11000000740000000000000000000000
fe534d42400000000000000009000100010000000000000005000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 0000000011000000740000000000000000000000 ==================== SMB Message 6 ====================
Command: 0x08 (SMB2_COM_READ) Status: 0x00000000 Flags: 0x00 PID: 6252 MID: 6 TID: 1026590178 Data: 49 bytes 310000000004000000000000000000003de8b73100000000716656fc000000000000000000000000000000000000000000
fe534d42400000000000000008000000000000000000000006000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 00000000310000000004000000000000000000003de8b73100000000716656fc000000000000000000000000000000000000000000 ==================== SMB Message 7 ====================
Command: 0x08 (SMB2_COM_READ) Status: 0x00000000 Flags: 0x01 PID: 6252 MID: 6 TID: 1026590178 Data: 84 bytes 1100500044000000000000000000000005000c03100000004400000002000000b810b810f05300000d005c504950455c737276737663000001000000 00000000045d888aeb1cc9119fe808002b10486002000000
fe534d42400000000000000008000100010000000000000006000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 000000001100500044000000000000000000000005000c03100000004400000002000000b810b810f05300000d005c504950455c7372767376630000 0100000000000000045d888aeb1cc9119fe808002b10486002000000 ==================== SMB Message 8 ====================
Command: 0x0B (SMB2_COM_IOCTL) Status: 0x00000000 Flags: 0x00 PID: 6252 MID: 7 TID: 1026590178 Data: 148 bytes 3900000017c011003de8b73100000000716656fc00000000780000005c00000000000000000000000000000004200000010000000000000005000003 100000005c000000030000004c00000000000f00000002000a000000000000000a0000005c005c0041004c00410052004d0050004900000001000000 01000000040002000000000000000000ffffffff0800020000000000
fe534d4240000000000000000b000000000000000000000007000000000000006c180000e285303d57cfad4d00000000000000000000000000000000 000000003900000017c011003de8b73100000000716656fc00000000780000005c000000000000000000000000000000042000000100000000000000 05000003100000005c000000030000004c00000000000f00000002000a000000000000000a0000005c005c0041004c00410052004d00500049000000 0100000001000000040002000000000000000000ffffffff0800020000000000 ==================== SMB Message 9 ====================
Command: 0x0B (SMB2_COM_IOCTL) Status: 0x00000103 Flags: 0x03 PID: 0 MID: 7 TID: 0 Data: 9 bytes 090000000000000021
fe534d4240000000030100000b00010003000000000000000700000000000000070000000000000057cfad4d00000000000000000000000000000000 00000000090000000000000021 ==================== SMB Message 10 ====================
Command: 0x06 (SMB2_COM_CLOSE) Status: 0x00000000 Flags: 0x00 PID: 6252 MID: 8 TID: 0 Data: 24 bytes 18000000000000003de8b73100000000716656fc00000000
fe534d42400000000000000006000000000000000000000008000000000000006c1800000000000057cfad4d00000000000000000000000000000000 0000000018000000000000003de8b73100000000716656fc00000000
Sry, just recognized - Samba Server is running on
3.18.10-1-ARCH #1 SMP PREEMPT Wed Mar 25 20:03:15 MDT 2015 armv7l GNU/Linux
Anything left you would need?
Fixed in pysmb 1.1.16
Thx a lot.
On 10.05.2015 08:58, Michael Teo wrote:
—
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. http://www.avast.com
With the New samba update i cannot use list_shares any more. Samba CN Show a New Parameter "allow nt4 crypto = yes" does not solve the problem.