It looks like the problem is two-fold, time difference between the server and the windows machine, and SELinux!
The time difference meant that all usernames and passwords were rejected. Setting the time more accurately allows the browsing of the server and the available shares.
The shares were still not accessible however, due to SELinux permissions.
Applying the following commands to my /files folder has brought SMB to life!
Code:
# chcon -R -t samba_share_t /files
The -R recursively sets permissions, the -t samba_share_t lets SELinux know you want to share the files.
In order to mark newly created files with the correct type you also need to set the default file context:
Create or edit:
/etc/selinux/targeted/contexts/files/file_contexts.local
Add the line:
Code:
/files(/.*)? system_u:object_r:samba_share_t
Useful commands (run as root):
Code:
sestatus - Check how strict SELinux is (enforcing = block anything without permission, permissive = only produce warnings)
setenforce permissive - Allow all services to run unrestricted, only produce warnings in the log file.
setenforce enforcing - Block all undefined services.
As far as my original problem goes, it now doesn't matter if SMB is run from the command line, or if it starts as a service, SMB Shares are accessible from Windows fine.
I'm still not convinced of the exact problem that ment running "smbd" on the command worked and running "service smb start" didn't work. I guess it will just be one of those mysteries!
Hope this helps others running either CentOS or RHEL (or any distro that has SELinux).
Cheers,
Finn