Link to home
Start Free TrialLog in
Avatar of AL_XResearch
AL_XResearchFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Samba: consuming Windows shares on Linux

I an creating a folder on my CentOS server which is mounted to a share on my Windows server. I have edited '/etc/fstab' to create the mount using credentials (i.e. Windows username and password) stored in a text file on the linux box. This all works perfectly at the moment.

This may seem a stupid question but do I need to:
  1. Create a samba user (if so how would I 'link' that user to the mounted directory) ?
  2. Edit the '/etc/samba/smb.conf' file to add a section for the mounted directory ?

I ask because I am NOT sharing anything from the CentOS box out and it works perfectly (i.e creating / deleting / modifying files and folders) without any of those settings.

Looking online it is really difficult to get a clear guide to Samba as they all have a slightly different take and most are talking about creating Linux shares not just consuming Window shares.
SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AL_XResearch

ASKER

noci. Thanks for the response.

1 - The CentOS 7 box is not marked as part of a domain. 'hostname' shows a domain suffix in the FQDN but I did not set one and there is nothing in [/etc/sysconfig/network]. Despite this my shares work. Could this be because in the fstab credentials file I have included 'DOMAIN' ?

2 - I thought so, but I wanted a second opinion.

As I say, online documentation of Samba is rather contradictory.
Avatar of noci
noci

If the windows environment is in a domain you needed to "net join " and thus become part of the domain in the past. otherwise the authentication to the kerberos of the Windows Domain could not work.
That is rather what I am saying - I have not done a 'net join' and yet it is working fine. So I am confused.

The only reason I can see why it works in light of your comments is the credentials file where I have specified the 'DOMAIN='

Can you explain ?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I get:
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

      security = USER
      server role = auto

OK, thanks. It is good to know I have understood correctly.

Keep in mind that in the [global] section of '/etc/samba/smb.conf' the 'workgroup = SMABA' - which I hope is correct ?
Windows files sharing is not simple, Microsoft used to have a policy to change a lot, document next to nothing (unless a very handsome amount of money was transferred)
Hence all the options and complexity the SMB  & CIFS protocols have.
The server side does determine how ownership is handled. I am not sure how windows needs to be configured. (As i have no windows systems).
I have the Windows side working fine (at least I can accessed the files generated there without issues).
Many thanks