Add User to Group In Linux

We can use the usermod command to add a user to a group. Here I am going to add the user grokman to the group adm:

root@myserver:~# sudo usermod -aG adm grokman
root@myserver:~# exit
Connection to myserver closed.
root@myserver:~# ssh myserver
Welcome to ...
root@myserver:~# groups
admin adm sudo www-data

In Debian / Ubuntu, the being in the adm group will allow you to view logs & do general system monitoring.

Tested on Ubuntu 18.04.5

Sharing is caring!

Leave a Comment

Your email address will not be published. Required fields are marked *


Notice: Undefined index: total_count_position in /var/www/wordpress/wp-content/plugins/social-pug/inc/functions-frontend.php on line 46
shares