Cannot get samba to work properly
I have newly installed RHEL 7.2 Server on an HP ProLiant DL980 server and am having a terrible time getting Samba up and running.
To be more specific, I have smb and nmb services up and running but the sharing process is not working.
It also seems sporadic - sometimes I can see my Windows shares from the Linux machine but other times see nothing. I have at least once been able to connect and move files from Spock (Linux machine) to Kirk (Windows 10) but not it is not there any more. I have never been able to see my Linux shares from the Windows machine no matter what I've tried. I have confirmed that all the machines are in a workgroup called WORKGROUP.
I have disabled SELinux. I may re-enable it at some point, but right now I want to remove it as a possible source for the problems for this and other areas.
I have attached my sbm.conf for your reading pleasure.
Attachments
Responses
Hello Scott,
after cleaning up your smb.conf file, I can say the following:
1.) You're having two [global] sections. Please merge them. 2.) Avoid periods in NetBIOS names. It's an allowed character, but Microsoft recommends not to use it (https://support.microsoft.com/en-us/kb/226144). Windows may treat it as a DNS name. 3.) You have set up an standalone server. I was first a bit confused, because you configured a [netlogon] share, too. However, this isn't a problem. I only wanted to make sure, you expected this setup to be a standalone Samba server.
When you say "...sometimes I can see my Windows shares from the Linux machine but other times see nothing.": - how are you trying to access the Windows share from Linux? - what error is displayed when the connection fails? - any firewalls involved?
Regards, Marc
Hi Scott,
it's not necessary to set the same credentials on Windows and Linux. However you have to authenticate, because you are using the default (Never) for the smb.conf file parameter "map to guest". If you don't have a Samba user added, you are not able to log in.
By the way: In the Linux host's firewall you have to open the following ports: 135/tcp, 137/udp, 138/udp, 139/tcp, 445/tcp.
To be able to browse the shares: Can you add "map to guest = Bad User" to the [global] section of your smb.conf, restart Samba, and try accessing accessing \linux-ip\
Regards, Marc
Hi Scott,
can you list the shares of the Linux host on itself?
$ smbclient -L localhost -Uuser_name
By the way: Do you connect to the host using the IP (\ip) or using the host name (\host_name)?
What is the error message when you try to list the shares using \ip\ ?
The following is the smb.conf of a standalone server I'm using since several years at home. I haven't tried it with Windows 10, but listing the shares on a Windows 7 and 8.1 works.
[global]
netbios name = Demo
server string =
workgroup = WORKGROUP
log file = /var/log/samba/%m.log
log level = 1
map to guest = Bad User
passdb backend = tdbsam:/etc/samba/private/passdb.tdb
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
If you run a different version than the one shipped with RHEL, Red Hat won't provide updates nor support. Anyway 4.5 doesn't make a difference in your situation, because browsing the shares on a standalone server works in all Samba version.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
