Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 113. Setting up Samba on an IdM domain member
You can set up Samba on a host that is joined to a Red Hat Identity Management (IdM) domain. Users from IdM and also, if available, from trusted Active Directory (AD) domains, can access shares and printer services provided by Samba.
Using Samba on an IdM domain member is an unsupported Technology Preview feature and contains certain limitations. For example, IdM trust controllers do not support the Active Directory Global Catalog service, and they do not support resolving IdM groups using the Distributed Computing Environment / Remote Procedure Calls (DCE/RPC) protocols. As a consequence, AD users can only access Samba shares and printers hosted on IdM clients when logged in to other IdM clients; AD users logged into a Windows machine cannot access Samba shares hosted on an IdM domain member.
Customers deploying Samba on IdM domain members are encouraged to provide feedback to Red Hat.
If users from AD domains need to access shares and printer services provided by Samba, ensure the AES encryption type is enabled is AD. For more information, see Enabling the AES encryption type in Active Directory using a GPO.
Prerequisites
- The host is joined as a client to the IdM domain.
- Both the IdM servers and the client must run on RHEL 8.1 or later.
113.1. Preparing the IdM domain for installing Samba on domain members Link kopierenLink in die Zwischenablage kopiert!
Before you can set up Samba on an IdM client, you must prepare the IdM domain using the ipa-adtrust-install utility on an IdM server.
Any system where you run the ipa-adtrust-install command automatically becomes an AD trust controller. However, you must run ipa-adtrust-install only once on an IdM server.
Prerequisites
- IdM server is installed.
- You have root privileges to install packages and restart IdM services.
Procedure
Install the required packages:
yum install ipa-server-trust-ad samba-client
[root@ipaserver ~]# yum install ipa-server-trust-ad samba-clientCopy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the IdM administrative user:
kinit admin
[root@ipaserver ~]# kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
ipa-adtrust-installutility:ipa-adtrust-install
[root@ipaserver ~]# ipa-adtrust-installCopy to Clipboard Copied! Toggle word wrap Toggle overflow The DNS service records are created automatically if IdM was installed with an integrated DNS server.
If you installed IdM without an integrated DNS server,
ipa-adtrust-installprints a list of service records that you must manually add to DNS before you can continue.The script prompts you that the
/etc/samba/smb.confalready exists and will be rewritten:WARNING: The smb.conf already exists. Running ipa-adtrust-install will break your existing Samba configuration. Do you wish to continue? [no]: yes
WARNING: The smb.conf already exists. Running ipa-adtrust-install will break your existing Samba configuration. Do you wish to continue? [no]: yesCopy to Clipboard Copied! Toggle word wrap Toggle overflow The script prompts you to configure the
slapi-nisplug-in, a compatibility plug-in that allows older Linux clients to work with trusted users:Do you want to enable support for trusted domains in Schema Compatibility plugin? This will allow clients older than SSSD 1.9 and non-Linux clients to work with trusted users. Enable trusted domains support in slapi-nis? [no]: yes
Do you want to enable support for trusted domains in Schema Compatibility plugin? This will allow clients older than SSSD 1.9 and non-Linux clients to work with trusted users. Enable trusted domains support in slapi-nis? [no]: yesCopy to Clipboard Copied! Toggle word wrap Toggle overflow When prompted, enter the NetBIOS name for the IdM domain or press Enter to accept the name suggested:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You are prompted to run the SID generation task to create a SID for any existing users:
Do you want to run the ipa-sidgen task? [no]: yes
Do you want to run the ipa-sidgen task? [no]: yesCopy to Clipboard Copied! Toggle word wrap Toggle overflow This is a resource-intensive task, so if you have a high number of users, you can run this at another time.
Optional: By default, the Dynamic RPC port range is defined as
49152-65535for Windows Server 2008 and later. If you need to define a different Dynamic RPC port range for your environment, configure Samba to use different ports and open those ports in your firewall settings. The following example sets the port range to55000-65000.net conf setparm global 'rpc server dynamic port range' 55000-65000 firewall-cmd --add-port=55000-65000/tcp firewall-cmd --runtime-to-permanent
[root@ipaserver ~]# net conf setparm global 'rpc server dynamic port range' 55000-65000 [root@ipaserver ~]# firewall-cmd --add-port=55000-65000/tcp [root@ipaserver ~]# firewall-cmd --runtime-to-permanentCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
ipaservice:ipactl restart
[root@ipaserver ~]# ipactl restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
smbclientutility to verify that Samba responds to Kerberos authentication from the IdM side:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
113.2. Installing and configuring a Samba server on an IdM client Link kopierenLink in die Zwischenablage kopiert!
You can install and configure Samba on a client enrolled in an IdM domain.
Prerequisites
- Both the IdM servers and the client must run on RHEL 8.1 or later.
- The IdM domain is prepared as described in Preparing the IdM domain for installing Samba on domain members.
- If IdM has a trust configured with AD, enable the AES encryption type for Kerberos. For example, use a group policy object (GPO) to enable the AES encryption type. For details, see Enabling AES encryption in Active Directory using a GPO.
Procedure
Install the
ipa-client-sambapackage:yum install ipa-client-samba
[root@idm_client]# yum install ipa-client-sambaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
ipa-client-sambautility to prepare the client and create an initial Samba configuration:Copy to Clipboard Copied! Toggle word wrap Toggle overflow By default,
ipa-client-sambaautomatically adds the[homes]section to the/etc/samba/smb.conffile that dynamically shares a user’s home directory when the user connects. If users do not have home directories on this server, or if you do not want to share them, remove the following lines from/etc/samba/smb.conf:[homes] read only = no[homes] read only = noCopy to Clipboard Copied! Toggle word wrap Toggle overflow Share directories and printers. For details, see the following sections:
Open the ports required for a Samba client in the local firewall:
firewall-cmd --permanent --add-service=samba-client firewall-cmd --reload
[root@idm_client]# firewall-cmd --permanent --add-service=samba-client [root@idm_client]# firewall-cmd --reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enable and start the
smbandwinbindservices:systemctl enable --now smb winbind
[root@idm_client]# systemctl enable --now smb winbindCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Run the following verification step on a different IdM domain member that has the samba-client package installed:
List the shares on the Samba server using Kerberos authentication:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
113.3. Manually adding an ID mapping configuration if IdM trusts a new domain Link kopierenLink in die Zwischenablage kopiert!
Samba requires an ID mapping configuration for each domain from which users access resources. On an existing Samba server running on an IdM client, you must manually add an ID mapping configuration after the administrator added a new trust to an Active Directory (AD) domain.
Prerequisites
- You configured Samba on an IdM client. Afterward, a new trust was added to IdM.
- The DES and RC4 encryption types for Kerberos must be disabled in the trusted AD domain. For security reasons, RHEL 8 does not support these weak encryption types.
Procedure
Authenticate using the host’s keytab:
kinit -k
[root@idm_client]# kinit -kCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
ipa idrange-findcommand to display both the base ID and the ID range size of the new domain. For example, the following command displays the values for thead.example.comdomain:Copy to Clipboard Copied! Toggle word wrap Toggle overflow You need the values from the
ipabaseidandipaidrangesizeattributes in the next steps.To calculate the highest usable ID, use the following formula:
maximum_range = ipabaseid + ipaidrangesize - 1
maximum_range = ipabaseid + ipaidrangesize - 1Copy to Clipboard Copied! Toggle word wrap Toggle overflow With the values from the previous step, the highest usable ID for the
ad.example.comdomain is1918599999(1918400000 + 200000 - 1).Edit the
/etc/samba/smb.conffile, and add the ID mapping configuration for the domain to the[global]section:idmap config AD : range = 1918400000 - 1918599999 idmap config AD : backend = sss
idmap config AD : range = 1918400000 - 1918599999 idmap config AD : backend = sssCopy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the value from
ipabaseidattribute as the lowest and the computed value from the previous step as the highest value of the range.Restart the
smbandwinbindservices:systemctl restart smb winbind
[root@idm_client]# systemctl restart smb winbindCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
List the shares on the Samba server using Kerberos authentication:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow