That's the Ubuntu way of creating the primary group with the same name as the user name. As you can see the user abhi belongs to the group abhi. Step 2: Get the groups detailsįirst, check the groups the user belongs to: groups username Once you know the user name, it's time to find the details about the group. I'll be changing the group of the user abhi and add it to sudoer list by adding it to the sudo group. Normally, the regular users (non-system users) are at the bottom of the long output of the compgen command: :~# compgen -u If you are not sure of the exact username, you can list all the users on your Ubuntu system. Verify that the user has been added to the group.Lists the group it belongs to and the group you want to add it to.Get the exact user name you are modifying and adding to a group.The entire process consists of the following steps: ![]() ![]() You won't always have all the details at hand and you may have to search for them. Steps for adding a user account to a groupĪs a sysadmin, you might need to know a few details before you add a user to a group.I'll go over the following in this tutorial: ![]() But if you are new to it, let's see the steps for adding a user to a group in a bit more detail. That was quick and simple if you are a seasoned Linux user. Quickly verify if the user was correctly added to the desired group by checking its groups: groups user_name Without the -a option, you'll overwrite the group settings and the user will belong to only the specified new group which could be catastrophic. It stands for 'append' and this way you add the user to a new group while keeping it in other groups as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |