o.st.
o.st.

Reputation: 5

Failing to connect to local server with credentials using smbclient

I am using a Raspberry Pi4 with an installed Raspberry Pi OS (32-bit) (Debian) system.

I am trying to use python to read and write files to and from a local server.

import smbclient
smbclient.ClientConfig(username = 'TEST', password = 'password')
smbclient.register_session('smb://192.168.119.10/', username = 'TEST', password = 'password')

These 3 lines already give me an Errormessage saying:

"Failed to connect to '%s:%s': %s" % (self.server, self.port, str(err))) from err ValueError:
Failed to connect to 'smb://192.168.119.10/:445': [Errno -2] Name or service not known. 

I have been using manual File explorer Systems to connect to the Server IP and the same username + password without a problem. I can't find a solution to get it to work using a python script. I tried other SMB commands aswell without luck.

Upvotes: 0

Views: 1503

Answers (1)

Alexander Lemeza
Alexander Lemeza

Reputation: 21

Try to replace 'smb://192.168.119.10/:445' with '192.168.119.10'

Upvotes: 2

Related Questions