How Do I Edit an Etc Group in Linux?

How Do I Edit an Etc Group in Linux?
Contents

How do I edit a group in Linux?

To modify an existing group in Linux, the groupmod command is used. Using this command you can change the GID of a group, set the group password and change the name of a group. Interestingly enough, you can’t use the groupmod command to add a user to a group. Instead, the usermod command with the -G option is used.

Can I edit etc passwd?

There is no such command to apply changes from /etc/passwd file. If user which details you’ve changed is logged in, it should just relogin to apply the changes. If not, they will be immediately available after login. This is because login reads details from passwd file during login and keeps it in memory until logout.

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.