Hello there, I'm wondering if you can help me with a Redhat 8 question dealing with…
- User
Hello there, I'm wondering if you can help me with a Redhat 8 question dealing with Active Directory?
- Assistant
Hello! I'll do my best to assist you with your Red Hat 8 query related to Active Directory. Please go ahead and ask your question, and I'll provide the information you need.
- User
How can I use the "realm" command to permit AD users to logon, but NOT grant them admin rights?
- Assistant
To allow Active Directory (AD) users to log on to a Red Hat 8 system using the
realmcommand but without granting them administrative rights, you can utilize the--membership-software=SUDOoption while configuring the realm.Here are the steps to achieve this:
-
Install the necessary packages:
sudo dnf install realmd oddjob-mkhomedir sssd samba samba-common-tools -
Join the Red Hat 8 system to the Active Directory domain:
sudo realm join --membership-software=SUDO <AD_domain>Replace
<AD_domain>with your actual Active Directory domain name. -
Edit the SSSD configuration file:
sudo vi /etc/sssd/sssd.conf -
Locate the
[sssd]section in the file, and add the following line if it doesn't already exist:override_homedir = /home/%uThis sets the user's home directory to the
/homedirectory. -
Save and exit the file.
-
Restart the SSSD service to apply the changes:
-
- User
Hi! Can you tell me who to format a line in RHEL 8's /etc/sudoers file that provide admin rights to the group "admins" in the Active Directory domain of "widgets.com"
- Assistant
Certainly! To grant administrative rights to the group "admins" in the Active Directory domain "widgets.com" in the
/etc/sudoersfile of Red Hat Enterprise Linux (RHEL) 8, you can use thesudoers.ddirectory and create a separate file specifically for this configuration.Follow these steps:
-
Open a terminal and run the following command to create a new sudoers file:
sudo visudo -f /etc/sudoers.d/widgetsReplace "widgets" with a descriptive name of your choice.
-
In the opened file, add the following line to grant administrative rights to the "admins" group:
%<PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> ALL=(ALL) ALLThis line gives the "admins" group from the "widgets.com" Active Directory domain full sudo privileges.
-
Save and exit the file.
-
Make sure the file has the correct permissions by running the following command:
sudo chmod 440 /etc/sudoers.d/widgetsThis command sets the permissions to
-r--r-----, allowing read access only for root and the group owner.
-