On CentOS 7, the differences between usermod-ag and usermod-g relate to how they handle user group assignments. The ag option assigns a user to a group based on their role or position, while the g option treats it more like a standard group membership. For example, if you're managing a team with defined roles, using usermod-ag ensures users are placed in the appropriate role-based group, whereas usermod-g might assign them to a regular group without role considerations.
The "-a" in usermod adds an appended group, while "-G" sets additional permissions. https://linux.die.net/man/8/usermod This example shows a user named joe in groups joe, storage, power. joe is the main member of joe. After running usermod -G wheel joe, he becomes part of joe, wheel. Then with usermod -aG wheel joe, his permissions expand to include joe, storage, power, and wheel.