smbclient tree connect failed nt_status_bad_network_name when folder exists
Asked Answered
M

1

10

When i try to enter in a specific folder in windows from samba there is always the same error, can someone please help

with error:

smbclient //CLOUDBOX/team/PS -Uuser%pass -c pwd
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.25]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

without error:

smbclient //CLOUDBOX/team/ -Uuser%pass -c pwd
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.25]
Current directory is \\SBSS-CLOUDBOX\team\
Magnus answered 30/8, 2017 at 13:33 Comment(0)
M
16

I've found the answer you need to put the parameter -D, like this:

smbclient //CLOUDBOX/team/ -D "PS" -Uuser%pass -c pwd
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.25]
Current directory is \\SBSS-CLOUDBOX\team\PS
Magnus answered 30/8, 2017 at 14:46 Comment(3)
Please explain what the -D parameter does. I can look it up, but that defeats the point of Stack Overflow.Patter
@Patter It specifies a directory. You can check what all the commandline flags mean by using man smbclientGelatinize
By trying to access //CLOUDBOX/team/PS, you're accessing the share "at the wrong level". The share is "team". So you can access //CLOUDBOX/team (probably NOT //CLOUDBOX/team/). If you want to drive into a specific directory, use the "-D" syntax, as mentioned.Romney

© 2022 - 2024 — McMap. All rights reserved.