From c8578479546fca61311cb606c6b0f3b33e5f77df Mon Sep 17 00:00:00 2001 From: aswatt <54380303+aswatt@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:57:32 -0800 Subject: [PATCH] add omsagent to omi group (#1555) --- installer/datafiles/linux.data | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/installer/datafiles/linux.data b/installer/datafiles/linux.data index b1b2b5483..39cec5a14 100644 --- a/installer/datafiles/linux.data +++ b/installer/datafiles/linux.data @@ -76,6 +76,8 @@ fi # Ensure omsagent is in the omiusers group, but leave omsagent as a group /usr/sbin/usermod -g omiusers omsagent 1> /dev/null 2> /dev/null +# Ensure omsagent is in the omi group as well +/usr/sbin/usermod -g omi omsagent 1> /dev/null 2> /dev/null # Add the 'nxautomation' group if it does not already exist # (Can't use useradd with -U since that doesn't exist on older systems) @@ -165,6 +167,10 @@ if ${{PERFORMING_UPGRADE_NOT}}; then # Unconfigure sudo if it's already configured RemoveSudoersSupport + # Remove omsagent from the omi group + echo "Removing omsagent from the omi group ..." + gpasswd -d omsagent omi + # Remove the service accounts echo "Deleting nxautomation service account ..." userdel nxautomation 2> /dev/null