Uid=1339(testaccount) gid=1339(testaccount) groups=1339(testaccount) In this instance we will change the group ID (GID) of the user. Now that the account exists, we can proceed with modifying it with ‘usermod’. We did not specify any options when creating the account, so it’s fairly vanilla and is not currently a member of any supplementary groups. This has created a user called ‘testaccount’. To start we’ll create a test user account for the purposes of modifying, for further information see our post on adding new users to Linux. If we want to add the same user account into any other groups, we can either modify the GID, or what is more common we will simply add supplementary groups.Įssentially the user account has one GID, as it has one primary group, but can also be added to any number of additional supplementary groups. This user account will have the group ID (GID) of this group, it’s the user’s primary group and the user is only in one of these types of group at a time. When we create a new user account, by default an initial primary group with the same name will be automatically created in the /etc/group file which contains local group configuration. Here we will cover some examples of using the various syntax options with usermod in order to modify existing user accounts in Linux, specifically to add them into a group.įirstly a quick word on the different types of groups we’ll be dealing with here. In Linux we can modify a local user account with the ‘usermod’ command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |