Monday, June 22, 2009

smbclient Woes on ESX

I'm writing a backup script for our ESX hosts, and I ran into a problem connecting to the Windows server.

After opening the firewall with
esxcfg-firewall -e smbclient

I still got an error attempting to connect to the Windows machine:

[root@ESX backups]# smbclient -U DOM\\adminusers //server01/backups password
Packet send failed to 10.4.136.255(137) ERRNO=Operation not permitted
Connection to server01 failed

Okay, so the firewall is blocking broadcasts (that ".255" at the end). The solution was to negate the need for the broadcast. smbclient was unable to resolve the IP address given just the hostname of "server01", and was attempting a netbios broadcast (I think).

The solution was to use the FQDN to server:

[root@ESX backups]# smbclient -U DOM\\adminuser //server01.example.com/backups password
Domain=[DOM] OS=[Windows Server (R) 2008 Enterprise 6001 Service Pack 1] Server=[Windows Server (R) 2008 Enterprise 6.0]
smb: \>

No comments:

Post a Comment