OMV 6.X (RC1) Active Directory

    • Offizieller Beitrag

    I have retired and have not really been using ad at scale. I used to use just winbind and then just sssd. sssd was the newer way so went with that. Couldn't get 6 to work with just sssd and started looking at other things. Ended up using sssd, winbind and realmd. I am open to any improvements.


    DNS is the backbone of ad. systemd-resolved.service may be an important thing I don'tknow why it was not in 6. Will look at it when I get some time.

    Thanks

  • Computing is a sort of retirement hobby for me, I was looking for things I might do over winter. I've been through the exercise of setting up FreeIPA in the past and an Ubuntu based AD-DC but that was only for use on a home network, I have no experience of using this in a pro environment. My old brain is in the slow lane these days, so I'm not sure if I'll to concentrate on this or put some energy into other things. TBH, I hadn't even revised the man page on nsswitch, but the absence of systemd might be NB.

  • donh Here's something you might find interesting. I spent a couple of hours this morning reviewing recent past forum posts on this topic where configs have used SSSD alone, winbind alone and even pbis. This post on the samba mailing list seems to describe the config you arrived at which uses SSSD but also requires winbind and seems to explain why.


    The question was asked in 2020 by someone running Debian Buster 10.5 and Samba 2:4.9.5+dfsg-5+deb10u1.


    "Re: Using SSSD + AD with Samba seems to require Winbind be running" https://www.spinics.net/lists/samba/msg165318.html


    If I've understood this correctly the key phrase here is "If you are running a Samba server as a member of a domain, you need to start winbind ....", which of course applies to OMV6, assuming debian 11 + samba 4.13 doesn't invalidate it.


    I've decided not to pursue this as it's of little practical value to me as a home user who makes as little use of Windows as possible. I also wonder how centrally administered user/groups fit with the OMv6 design where all local user accounts are given a primary group of users (gid 100) and setguid is used on all "shared folders" created via the Webui.


    Anyway, if you hadn't seen it, I hope that ref is of interest to you.

    • Offizieller Beitrag

    Interesting reading, thanks. Explains some of what I was seeing. As long as it works I am ok with it for now. Will try to use only sssd when OMV7 comes out. Maybe even see if I can run 7 as an ad server and dump the windows servers.


    Seems not many are using active directory these days. Would be interesting to know how many care and what they are using.

  • Hello folks,


    I'm very new to OMV and I just installed OMV6. I was looking for a guide to integrate it with AD when I found this thread. I haven't read through all of it, but I'm intrigued to try it out. I have to run out for a minute but when I get back I will try to follow your instructions to see if I can integrate with a Windows Server 2022 AD environment (two DCs using LDAPS).


    Will report my progress accordingly, thanks.

  • Quick update:


    My Environment:

    • 2 Windows Server 2022 DCs (both acting as DNS servers)
    • OMV version 6.0.46-5 (Shaitan)
    • Kernel: Linux 5.19.17-1-pve
    • Userbase: 100+ (this is a small church network)

    I followed the directions in the first post, plus the updates made later on, and I'm happy to report that on my first try all seems to be working. I did not run into any errors other than what you already pointed out during the installation of SSSD (where the configuration file isn't present yet so there are some "file not found" errors).


    The only thing I did differently was with the edit of the /etc/nsswitch.conf file. I simply added winbind after files, since I saw that systemd and sss were present. I saw in another thread where there was a discussion on this and there seemed to be a consensus that at least systemd needed to be present in this file. I'm not really sure what the consequences will be, but I guess we'll find out with time.


    Also, I haven't had a need to use the Fix-ad.sh script so I'm hoping I wouldn't.


    One thing I did notice that, from the Web UI, I was not able to simply edit the ACLs on existing Shared Folders. I had to delete and recreate, and also the associated SMB/CIFS shares.


    PS. One thing I'm a bit confused on is OMV's distinction between "Privileges" and "ACLs". Perhaps off topic, but if someone could explain I'd really appreciate it.

  • You're welcome donh.


    Your advice is duly noted and I do plan on testing and documenting my journey with OMV. This was a very quick proof-of-concept, but I intend on building a rackmount server with several terabytes of storage capacity later, so it will give me a chance to redo the installation and document every step.

  • I managed to get this working with Windows Server 2019 Standard as AD server, but we have thousands of users and groups. A simple workaround that seems to be working is to disable enumeration of users and groups

    in the extra settings for smb:

    Code
    winbind enum users = no
    winbind enum groups = no

    Then you can add only the the users or groups that you need by adding them manually to the /etc/passwd or /etc/group files.

    To determine the text that needs to be added just use

    Code
    #for users:
    getent passwd username@domain.com
    #for groups
    getent group "some group"
    Or you can add the result to the file with the line:
    getent passwd username@domain.com >> /etc/passwd
    getent group "some group" >> /etc/group

    I do have a problem that must have happened during all of my testing/configuring where all of the users and groups are displayed twice in the web ui for some reason. I can't seem to find anyone else with the issue if anyone can tell me where to look for a solution/cause.

    • Offizieller Beitrag

    Welcome to the forums and thanks for testing.


    I have only had less than 40 users so not thousands. Having to enter users and groups kind of defeats the reason for using AD. There are many options in /etc/sssd/sssd.conf .

    sssd.conf(5) — sssd-common — Debian bullseye — Debian Manpages

    Some can be used to limit the users and groups that show up like this. It is from my omv5 implementation so check the newer version. Formatting may suck.


    # If unneeded users or other objects show.

    # Use "dsquery user -name"  test to see on windows with powershell

    #ldap_user_search_base = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=example,DC=com

    # ldap_user_search_base = CN=Users,DC=example,DC=com


    Here is an older article that may be useful.

    Anatomy of SSSD user lookup
    This blog post describes how a user lookup request is handled in SSSD. It should help you understand how the SSSD architecture looks like, how the data flows…
    jhrozek.wordpress.com


    There are also some caching options if lookups are slow.


    Good luck.

  • Thanks for the description!

    Worked for me today in my small Homelab with Microsoft Windows Server 2012 R2.

    Hardware: ASRock B150M PRO4S/D3, Intel Pentium G4400, Kingston ValueRAM 8 GB DDR3-1600 Kit (KVR16N11S8K2/8) 2x 4 GB, Kingston SSD Now V300 120 GB, 3x Toshiba HDWE140EZSTA 4 TB, be quiet! System Power 7 300W, Case Nanoxia Deep Silence 4


    Software: Openmediavault 6.3.0-2, 6.0.0-0.deb11.6-amd64, Software Raid 5, integrated into MS Windows Server 2012 R2 AD Domain

  • Dear donh,


    Have followed your instructions to the letter and it worked: currently setup is 6.3.0-2 (Shaitan) and wintel server is Windows Server 2019.


    had to reboot after joining the OMV to domain with "sudo net adm join -U adminuseraccount"


    Thank you very much

    • Offizieller Beitrag

    Might be a good idea to add apt install needrestart so services are restarted when needed. Here is the output after the latest update.

    Not sure if not restarting would cause issues. Better safe than sorry.

    More info:

    forum.openmediavault.org/index…&postID=327869#post327869
    • Offizieller Beitrag

    Small update to Fix-ad.sh script. If you are running remotely it may need to run net join -U donadmin first. That might fix it on it's own. See this thread. RE: multiple issues with a production server after a flawless 30 days of work

    Looks from that /etc/krb5.keytab was missing. I think joining the AD may supply that file. Should be easy enough to script it if needed.

    Any feedback is welcome.



  • Hello!

    How are you?


    I have Rocky Linux 8.7 as samba ad-dc working well

    After follow your steps I can join the omv to AD-DC ok!

    but my winbind not working in OMV


    The problem is: How to do samba member-fileserver (OMV6) shows the users, groups from AD-DC

    or, to this works nice, I need follow official doc samba-ad-member and do the commands permissions of disc and more? (SetDisKOeperator....)


    Or what is the right way Please?


    Thanks

    Douglas Giovani Oechsler
    Prudentópolis-PR-Brazil

    • Offizieller Beitrag

    You are the first to report using a samba AD. Thanks for testing. If the users and groups show up in OMV. You should be able to create a share and assign acl and or permissions for the share in the OMV web UI.


    "but my winbind not working in OMV" I think winbind is for windows connectivity. So maybe not needed for samba? I would see if you can find a tutorial on joining a debian 11 file server to a samba AD. sssd may be all that is needed?


    Good luck and let us know if you find answers.

  • Hi Donh. Thaky you for this tut. I am using 6.3.10-2 (Shaitan), and can't find this part in my web ui

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!