Day5 of #30DaysLinuxChallenge

Some Linux commands can be confusing.

While working on my assignment,I used gpasswd -M... and accidentally wiped everyone out.

I was just trying to add new members to a group.

Typed: gpasswd -M user1,user2 projectgroup
What I should have done: Included the old members too, because -M doesn’t add, it replaces.

Mistakes like this taught me to always check /etc/group and /etc/gshadow before and after making changes.

If you're learning group management in Linux, don’t skip understanding what the command actually does under the hood.

Also, not all flags are the same: -a vs -A in gpasswd.

  • Both are used in gpasswd.

  • Both deal with adding users.

But only one makes the user a group admin (-A), while the other just adds them to the group (-a).

It’s a small difference, but it can create big access issues if you're managing users on a live system.

Tip: Always double check what the flag does before running it—especially with elevated permissions

📌 Want to go deeper?
I created a free, clean and beginner-friendly PDF guide titled
“Linux Group Management: Commands, Concepts & Common Mistakes”

It covers the essential commands, explains what they do under the hood, and highlights easy-to-make mistakes (like the one I made with gpasswd -M).

Image description
Download the Linux Group Management Cheat Sheet

Let’s Connect on LinkedIn

(https://www.linkedin.com/in/chiamaka-chielo?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app)

As I automate my journey into RHCE and Ansible, I’d love to connect with fellow learners and professionals. Feel free to reach out and join me as I share tips, resources, and insights throughout this 30-day challenge.

cloudwhistler #30daysLinuxchallenge