HI Fellow Redditors,
I am having some trouble with getting a Samba share defined. My knowledge of Samba is relatively thin so need some help on getting this setup.
Ill explain the setup first :
2 x Linux machines both on 192.168.90.0/24 network ( I am using Samba instead of NFS just for testing to see how it works )
Here is the Samba server config for the relevant share :
[publicshare] comment = public share path = /testshare/share writeable = yes browseable = yes public = yes hosts allow = 192.168.90.1
I created a local user called "rhel" and added this to the smb database with "smbpasswd" :
smbpasswd -a rhel
The permissions on the directory being shared is as follows :
ls -ld /testshare/share/
drwxr-xr-x. 2 root root 4096 Oct 19 12:41 /testshare/share/
The directory above is also 755. I am running SELinux and the appropriate context has been set on this :
semanage fcontext -a -t samba_share_t /testshare/share/
ls -ldZ /testshare/share/
drwxr-xr-x. root root unconfined_u:object_r:samba_share_t:s0 /testshare/share/
Now I can list all shares as follows :
smbclient -L 192.168.90.2 -U rhel
Enter rhel's password: Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-169.el6_5]
Sharename Type Comment --------- ---- ------- publicshare Disk public share IPC$ IPC IPC Service (Samba Server Version 3.6.9-169.el6_5) rhel Disk Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-169.el6_5]
Server Comment --------- ------- TESTING-WORDPRES Samba Server Version 3.6.9-169.el6_5 Workgroup Master --------- ------- MYGROUP TESTING-WORDPRESS
However when I try to connect to this from the other Linux VM I get the following error :
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-169.el6_5] tree connect failed: NT_STATUS_BAD_NETWORK_NAME
Actually even if I do this from the Samba server I get the same error. All posts online seem to point to permissions, but they seem ok to me.
Is there anything I am missing ?
Thanks !
[link][2 comments]