Difference between "usermod -aG" and "usermod -G" options in linux?
Go to solution
Solved by Guest,
the "-a" in usermod is append and "-G" assigns supplementary groups. https://linux.die.net/man/8/usermod
So lets say you have a user named joe and its in groups joe,storage,power. joe would be the primary group of joe.
usermod -G wheel joe
joe now belongs to joe,wheel
usermod -aG wheel joe
joe now belongs to joe,storage,power,wheel

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now