Configure Samba Share For Domain Authentication

this one took a while to figure out, so I’m sure anyone who reads this will appreciate it.

log into your samba server as root, as always make a backup of the config file, (for me i will put the backup copy in the root home directory, so run the following command to make a backup of the file

cp /etc/samba/smb.conf /root

from there you want to verify that the copy of the samba config is there by typing the following command:

ls /root

you should see smb.conf in the folder, from there we can get down to business.

type the following command to edit the samba config file:

vi /etc/samba/smb.conf

scroll to the bottom of the document, and create a new share, here is what you will need to type to get the share working:

 

[Name Of Share]

comment = /info you may want known about the share

path = /path/of/shared/folder

writeable = Yes

oplocks = No

level2 oplocks = No

force create mode = 775

force group = (UNIX user/Group you want to use permissions from) root

directory mask = 775

force directory mode = 775

 

(double check the typed information, the smb.conf is case sensative, and will stop working, if there is a typo)

from there save and quit by using the following sequence:

ctrl + c

:wq

that saves and quits the file

from there restart samba with the below command:

service smb restart

now you should be able to browse to the share by browsing to the NameIP of the Box

if you right click, and select “properties” and go to the security tab, it should look as follows:

from here you can apply permissions to Windows/Active Directory Users/Groups so that in the future all you have to do is add users to the Active directory group to give them access to the Samba Share Folders