Forums

Resolved
3 votes
Samba Directory has been formally released on ClearOS 7.x on October 20, 2015 and currently in Beta and looking for active testing and feedback. ClearOS 7 Community app details can be found here: https://sfj48-fkj200.heiksthsd.cf/clearfoundation/software/clearos-7-community/marketplace/server/Samba_Directory_(Beta)

Please provide any feedback in this forum post and plan on great collaboration to find and resolve any open bugs regarding ClearOS 7.x and Samba Directory. Thank you in advance!
Wednesday, November 25 2015, 06:24 PM
Share this post:
Responses (12)
  • Accepted Answer

    x
    x
    Offline
    Friday, March 11 2016, 07:48 PM - #Permalink
    Resolved
    1 votes
    Austin Tech wrote:

    Marcel van Leeuwen wrote:

    [offtopic]
    Okay, I borked my ClearOS Community VM. I thought to upgrade to business silver for 30 days but I can't. I already did before I suppose. Is a ClearOS 6 license transferable to 7?
    [/offtopic]

    I tried what you devs suggested on my unregistered (I suspect this make no difference) VM and groups still aren't visible.

    btw, I like the category headers menu!


    Hi Marcel,

    Try the info from Step 10 in my post below. Here is the info for quick reference:

    If you have a working Samba Directory but all of the Windows Group domain user settings are not there, it appears this currently a known issue with a fix in the works. Here is a temp fix that resolved the issue for me: Log into ssh or console as root and perform the following:

    nano /usr/clearos/apps/samba_directory/libraries/Group_Manager_Driver.php

    use Ctrl W to find and jump to: "if (! in_array($group_name"

    Then comment out the following lines:

    // if (! in_array($group_name, $valid_list)) {
    // $entry = $this->ldaph->next_entry($entry);
    // continue;
    // }

    Press Ctrl X, type Y to save, hit enter. Restart your webconfig or reboot, and when you go into the User Group portal, all of the user group settings, windows domain user groups, etc. should all be there.


    @Austin Thank you! Okay, did as you said and it's working but that VM is borked (not registered).

    So I setup a new ClearOS VM and with Samba Directory. Samba Directory is starting but if I go to account/groups it's reporting "configure Samba Directory". Of course Samba Directory is already configured...
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 10 2016, 07:10 PM - #Permalink
    Resolved
    1 votes
    Marcel van Leeuwen wrote:

    [offtopic]
    Okay, I borked my ClearOS Community VM. I thought to upgrade to business silver for 30 days but I can't. I already did before I suppose. Is a ClearOS 6 license transferable to 7?
    [/offtopic]

    I tried what you devs suggested on my unregistered (I suspect this make no difference) VM and groups still aren't visible.

    btw, I like the category headers menu!


    Hi Marcel,

    Try the info from Step 10 in my post below. Here is the info for quick reference:

    If you have a working Samba Directory but all of the Windows Group domain user settings are not there, it appears this currently a known issue with a fix in the works. Here is a temp fix that resolved the issue for me: Log into ssh or console as root and perform the following:

    nano /usr/clearos/apps/samba_directory/libraries/Group_Manager_Driver.php

    use Ctrl W to find and jump to: "if (! in_array($group_name"

    Then comment out the following lines:

    // if (! in_array($group_name, $valid_list)) {
    // $entry = $this->ldaph->next_entry($entry);
    // continue;
    // }

    Press Ctrl X, type Y to save, hit enter. Restart your webconfig or reboot, and when you go into the User Group portal, all of the user group settings, windows domain user groups, etc. should all be there.
    The reply is currently minimized Show
  • Accepted Answer

    x
    x
    Offline
    Thursday, March 10 2016, 06:28 PM - #Permalink
    Resolved
    0 votes
    [offtopic]
    Okay, I borked my ClearOS Community VM. I thought to upgrade to business silver for 30 days but I can't. I already did before I suppose. Is a ClearOS 6 license transferable to 7?
    [/offtopic]

    I tried what you devs suggested on my unregistered (I suspect this make no difference) VM and groups still aren't visible.

    btw, I like the category headers menu!
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 10 2016, 05:05 PM - #Permalink
    Resolved
    0 votes
    In addition to Pete's suggestion you may also require:

    service winbind restart
    nscd -i hosts


    B
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 10 2016, 04:55 PM - #Permalink
    Resolved
    0 votes
    Hi Marcel,

    Marcel van Leeuwen wrote:

    Running ClearOS Community 7.2. I'm not sure if this is related to Samba Directory. I Installed Samba Directory and I have some issues with flexshares and groups. I can add user defined groups but there not visible in the group app. This also applies for Windows and build in groups. If I add a flexshare I can't select a group. Please some info.


    Samba is out of my league, but here's one thing to check. Does your /etc/samba/smb.conf file contain the following parameter:

    winbind expand groups = 1

    If not, add it to the "global" section of the smb.conf file.
    The reply is currently minimized Show
  • Accepted Answer

    x
    x
    Offline
    Wednesday, March 09 2016, 05:24 PM - #Permalink
    Resolved
    0 votes
    Running ClearOS Community 7.2. I'm not sure if this is related to Samba Directory. I Installed Samba Directory and I have some issues with flexshares and groups. I can add user defined groups but there not visible in the group app. This also applies for Windows and build in groups. If I add a flexshare I can't select a group. Please some info.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 01 2016, 12:56 AM - #Permalink
    Resolved
    0 votes
    ***THIS POST HAS BEEN EDITED FROM THE ORIGINAL***

    Dear ClearOS and Community,

    After messing around with ClearOS 7.2 and reading several Samba Directory help articles, I thought it was only right to update this post with a comprehensive "How To" because the current Samba4 Directory Beta can be tough to get working.

    As a quick FYI... if you are running the community version, I believe the setup has less issues than the Business edition for reasons I haven't quite figured out yet.

    However, here is how I was able to get a working Samba Directory running on ClearOS 7.2 Business:

    1.) First, perform a clean install of ClearOS 7.2 and install Samba Directory from the market place. Do not initialize the app yet as I can not guarantee any of the below will work without having a fresh, uninitialized Samba Directory on a working install of ClearOS.

    Here is my setup for reference:
    ClearOS 7.2 Business Edition
    1st NIC: External Static IP, ISP Gateway IP, ISP's DNS Servers
    2nd NIC: LAN Static IP (DHCP server enabled) - set to 192.168.1.1, 255.255.255.0

    The following domain setup works well when you own a registered domain:

    Server Mode: Gateway
    Master/Slave/Standalone: Standalone
    Servername: CompanyGateway
    Domain: company.com
    Host: gateway.company.com (The DNS A record for this alias points to External Static IP)
    Internet Host: gateway.company.com
    AD Realm: AD.GATEWAY.COMPANY.COM
    Windows Domain: Company (or choose whatever)
    Netbios name: CompanyPDC (or choose whatever 15-char)

    If you do not have your own domain use the following non-compliant setup using local hostnames:
    Domain: company.local
    Host: gateway.local
    Internet Host: gateway.local
    AD Realm: COMPANY.LOCAL
    Windows Domain: Company (or choose whatever)
    Netbios name: CompanyPDC (or choose whatever 15-char)

    2.) After your fresh OS install, turn on the DHCP server for your Static LAN IP, then check both the /etc/hosts and /etc/resolv.conf. They are usually not setup correctly during OS installation, and Samba Directory will fail initialization without correcting them.

    I have modified mine to read:

    /etc/hosts
    127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.1.1 gateway.company.com ad.gateway.company.com company #This IP should point to your Static Internal LAN IP, not your External Static WAN IP

    /etc/resolv.conf
    domain company.local
    nameserver 8.8.8.8 ## this usually reads 127.0.0.1 but Samba will fail without a working DNS server, so use your ISP's DNS server or Google's (8.8.8.8)

    3.) Next, log into SSH or load up a terminal screen and login as root. Perform the following operations

    rm /etc/samba/smb.conf -fv #This removes the default initialized file and we will create a new one later

    4.) Next, perform the following command so you can determine what the name of your Static Internal LAN ethernet adapter is:

    netstat -i -e

    This will report the names of all of your ethernet adapters (useful if you have more than 1). Find the adapter name for the NIC that is setup as your LAN IP (etc. 192.168.1.1). My adapter name is eth1 for LAN, and eth0 for WAN. This is VERY important because Samba Directory needs to bind to the correct NIC and by default it may bind to your External or other NICs.

    5.) Next, run the following command to provision your smb.conf file. Make sure you use YOUR NIC adapter name (that you wrote down in Step 4) in place of eth1 below.

    samba-tool domain provision --use-rfc2307 --interactive --option="interfaces=lo eth1" --option="bind interfaces only=yes"

    This will bring you through the step by step initialization of your smb.conf file. Be sure to use the correct domain names from Step 1, correct DNS from Step 2. If you get through Step 5 successfully, you can now go back to your webconfig to Initialize the directory.

    6.) Go the Samba Directory portal in webconfig. You will see most of the settings are correct from the smb.conf file you just created. Add a comment, setup your Netbios name, and be sure to select /home/DOMAIN/Users for your home user folders. I do not know why, but selecting with domain seems to work best.

    7.) Click initialize and wait. If everything was setup correctly you should actually get through this step without the directory hanging at the Domain SIP step. If it does hang, don't fret, move on to the next step.

    8.) Reboot your machine and log back into webconfig. Go to the Samba Directory portal and make sure it is running (i.e. not Dead). If it is just "Stopped" then click start and it should start running.

    9.) Go to the User/Group portal in the webconfig. On Business editions, it may route you to first choose between Master/Slave/Standalone. After you have selected your AD/DC type, go back to the User/Group portal. If there are any errors like LDAP is offline, just reboot and repeat step 8.

    10.) Now finally, when you have a working Group/Users portal, you may notice that all the Windows Group domain user settings are not there. This was stumping me but it is a known issue that is currently being resolved. Here is the workaround that wresolved the issue for me: Log back into ssh or terminal console as root and perform the following:

    nano /usr/clearos/apps/samba_directory/libraries/Group_Manager_Driver.php

    use Ctrl W to find "if (! in_array($group_name" at line 269. Then comment out lines 269-272:

    // if (! in_array($group_name, $valid_list)) {
    // $entry = $this->ldaph->next_entry($entry);
    // continue;
    // }

    Press Ctrl X, type Y, hit enter. Restart your webconfig or reboot, and when you go into the User Group portal, all of the user group settings, windows domain user groups, etc. should all be there!

    Hopefully there will be an update shortly that will resolve all of these necessary steps for the current Beta version of Samba Directory.

    Goodluck!

    -Austin
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, December 31 2015, 03:46 PM - #Permalink
    Resolved
    0 votes
    I've got it working (sort of..) - but went through the same pain as you (Kostantin) .. I found (through reading the Samba pages) that you MUST have a static IP. The moment I changed to static (from dhcp), the settings survived a reboot.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, December 29 2015, 11:21 AM - #Permalink
    Resolved
    4 votes
    I have clear install of ClearOS7 and SAMBA4 don't work at all

    I have make it few times:
    VirtualBOX
    1. Clear install of ClearOS7 as server with one ethernet and local area (without any firewall) DHCP CLIENT
    2. At wizard: make all updates (I don't install any apps from market)
    3. Reboot (try without, the same)
    4. Go to server/users and have 3 options: LDAP, SAMBA4 and MS Connector (not available)
    5. Click to SAMBA4 and apply all as default SERVER NAME and etc.
    6. It fails on DOMAIN SID: S-1-5-21-2485327205-1595316610-3853825375
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 27 2015, 04:32 PM - #Permalink
    Resolved
    0 votes
    Bianca & Werner wrote:

    Hi guys

    Which version of Samba 4 is the ClearOS Samba Directory app currently built on?


    The version is from upstream for now: 4.1.12. However, this will be updated to 4.2.3 once CentOS 7.2 is released. That CentOS version is a work in progress at the moment - it's in QA.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 27 2015, 01:47 PM - #Permalink
    Resolved
    0 votes
    Hi guys

    Which version of Samba 4 is the ClearOS Samba Directory app currently built on?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 26 2015, 04:06 PM - #Permalink
    Resolved
    0 votes
    Hi all,

    Once source of confusion keeps coming up, so I'll clarify it here. There are two ways to run Samba 4:

    1) Using good old NT Domains (Samba + OpenLDAP) - it's the same solution that was in ClearOS 5 and 6.
    2) Using Samba as an Active Directory Domain Controller, or as we call it, Samba Directory.

    Both modes use Samba 4.x under the hood.

    In the earlier part of the Samba 4 development cycle, the code was the pure Active Directory solution with very little connection to the mainline Samba 3 stack. For a few years, developers, bloggers, and users often used Samba 4 as a synonym for Active Directory Domain Controller, and Samba 3 for good old Samba (NT Domains, Printing, File Server, etc). It was only relatively recently that the Samba 3 and Samba 4 code bases merged and became one somewhat unified unit. The Samba 4 releases now contain both the Active Directory Domain Controller stuff, as well as the older Samba 3 code.
    The reply is currently minimized Show
Your Reply