Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to Window's network attached storage share #6

Open
SHAPPY0 opened this issue Apr 10, 2021 · 0 comments
Open

Unable to connect to Window's network attached storage share #6

SHAPPY0 opened this issue Apr 10, 2021 · 0 comments
Assignees

Comments

@SHAPPY0
Copy link

SHAPPY0 commented Apr 10, 2021

Hi,
I'm trying to connect to Network attached storage(NAS share)

const smb2 =  require("@stifani/smb2");
const client = new smb2.Client(config.host);
const session = await client.authenticate({
  domain:config.domain
  username:config.username
  password : config.password
});
const tree = await session.connectTree(config.sharepath);

but its throwing me an error object -


Response {
    header:{
        protocolId:'fe53d42',
        structureSize:64,
        creditCharge:0,
        status:3221225676,
        type:3,
        credit:1,
        flags:1,
        nextCommand:0,
        messageId:3n,
        clientId:'00000000',
        treeId:0,
        sessionId:'0ca0530000000abe',
        signature:0
    },
    body:{
        structureSize:9,
        shareType:0,
        reserved:0,
        shareFlags:0,
        capabilities:0,
        maximalAccess:0
    },
    typeName: 'TreeConnect',
    request: Request {
        header:{
            messageId :3n,
            clientId: 'ea45b4b7',
            sessionId: '0ca0530000000abe',
            treeId: undefined,
            type: 3
        },
        body:{
            buffer: <Buffer 5c 00 5c 00 6e 00 61 00 73 00 76 00 30 00 36 00 30 00 31 00 3a 00 34 00 34 00 35 00 5c 00 5c 00 62 00 63 00 6d 00 5f 00 64 00 61 00 74 00 61 00 5f 00 ... 28 more bytes>
        },
        typeName: 'TreeConnect'
    }
}

Can someone please confirm me where is the issue, if its in my code then please help me to fix it.

Thanks

@ardean ardean self-assigned this Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants