Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#2271·impacket

All SMB shares report type of Disk

Author: rwakulszowaCreated Aug 27, 2026Updated Sep 3, 2026
Labelsbugmedium

Configuration

impacket version: master Python version: 3.14 Target OS: Fedora

Debug Output With Command String

All shares claim to be of Type=Disk, regardless of the specified shareType option.

I'm running a local server with different share types (see the python code below) and talking to it with smbclient:

smbclient --port=4455 -U="user%password" -L=localhost

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            Disk
        DISK            Disk      I am a disk
        PRINTER         Disk      I am a printer

Additional context

Repro using impacket SMBClient:

import time
import multiprocessing
from impacket import smbserver 
from impacket.smbconnection import SMBConnection

def server():
    server = smbserver.SimpleSMBServer(listenAddress="0.0.0.0", listenPort=4455)
    server.addShare("disk", "/disk", "I am a disk", shareType="1")
    server.addShare("printer", "/printer", "I am a printer", shareType="3")
    server.setSMB2Support(True)
    server.start()


if __name__ == '__main__':
    p = multiprocessing.Process(target=server)
    p.start()

    time.sleep(2)

    client = SMBConnection("localhost", "127.0.0.1", sess_port=4455)
    client.login("user", "password")
    for share in client.listShares():
        print(share.dump(), "\n")
    
    p.terminate()

yields:

SHARE_INFO_1
shi1_netname:                    'IPC$\x00'
shi1_type:                       0
shi1_remark:                     '\x00' None

SHARE_INFO_1
shi1_netname:                    'DISK\x00'
shi1_type:                       0
shi1_remark:                     'I am a disk\x00' None

SHARE_INFO_1
shi1_netname:                    'PRINTER\x00'
shi1_type:                       0
shi1_remark:                     'I am a printer\x00' None

Source: fortra/impacket

View original on GitHubView discussion on GitHub