Saturday, March 5, 2011

How to make FreeNAS work with Active Directory

Original article here.
  1. Install Free Nas (do the normal assign disks mount them take default access settings)
  2. configure access (active directory) if you got your settings right you should be able to go into information (ms active directory) and see its now grabbed the list of users and groups, ignore the failed to create users or groups bit in the log, im no linux expert but i dont belive its anything to worry about since my log still says it and AD is working FINE !!
  3. enable cifs/smb (ensure you select to turn on EA support and Dos attributes)
  4. Once you have done that create a master share to your mount point, i called mine Admin ENSURE your master share has set HOSTS ALLOW as your FIXED STATIC IP ADDRESS of your main SERVER or the administators IP, in Hosts deny put ALL this will block everyone else, also take the tick out of browsable.
  5. On your windows AD server (the one you just put the IP address in for above) map the admin share, either manually create the map, or set the share you created to browsable, then map it and then change it back to not browsable once you mapped the drive.
  6. now we have a secure (well its as good as its going to get) way to administrate the shares lets create some folders.
  7. now its the time when it all goes wrong for everyone else from what ive read, ive heard a few people managed but no conclusive way, which is why im documenting mine. Right click the folder and select properties, then the security tab, then the advanced buttont (dont cheat you need to press the advanced button it wont work if you dont, you will see why in a minute)
  8. click add and select the user(s) or groups you want to add, once added select their access permission to the folder, finally click apply, as soon as you do you will see you previous had administator, everyone and wheel listed in users, you added a few but the system has also loaded on creator group, creator owner and a second everyone flag.
  9. if you use the basic add users you cant see the second everyone, see one has None in permission and the other has read and execute, delete the one with read and execute permission and click apply. it should stay gone. Ignore the other permissions, delete anything other than what i say they will just come back and screw it all up, trust me. The hours i spent before i realised in advanced it was duplicating the everyone flag...
  10. Now the new folder with permissions in the admin share is accessable by the admins ip only, so we need to share this. Create a new cifs/smb share (ensure you tick inherit permissions and browsable this time) and select it map it to your created (permission set) folder.
  11. Test it out, the user(s) with permissions can see the folder and use it (read / write) the users who cant can see the folder and cant access it.

2 comments:

  1. i have tried this but i cant get it to work. i can get to step 5 and map the share on the server but when i try to create new folders i keep getting that i am denied because i have no rights to create the folder.

    any suggestions?

    ReplyDelete
  2. @gerrit: Hmmm, I'm not sure. At the moment I don't have access to a FreeNAS box to experiment with... When I did this it worked for the first try. One thing I can imagine is that you started from a non standard or non default installation of the domain controller. Try to ask for some help in the original place of this post. You can find the link at the top of this page.

    ReplyDelete