![]() Here, I have created a group named “ mortygroup” with GID 2023. You can easily do this by prefixing the sudo command and then providing the user password. However, You have to be a root user to execute the groupadd command. You can create a new group with your desired GID from the terminal using the groupadd command. Step 01: Create a Group with a Specific GID in Ubuntu I have illustrated the full process in the following 4 steps. In the following example, I will create a new user named “ morty” with a specific GID 2023. Creating a User With a Specific GID in Ubuntu How to Create a User in Docker Container Without Docker File?ī.Create User Without Home Directory in Ubuntu in Just 3 Steps.How to Create a Jenkins User on Ubuntu?.NB: By default, a newly created user contains the GID same as the UID if not specified. In the following image, you can see that the new user “ rick” has been assigned with the desired UID 2013. You can check whether the new user “ rick” contains the assigned UID:2013 by typing the following command. Step 02: Confirm Whether the User Contains the Specific UID Moreover, now you can now log into the new user “ rick” whenever you want. Now, to be capable of logging into the newly created user “ rick”, you need to set a password for the user by typing the following command: sudo passwd rickĪfter running the above command, you’ll be able to set a password for the newly created user like the following image. In the following image, you can see that I have created a new user named “ rick”. Type the following command in the Ubuntu terminal. However, You have to be a root user to execute the useradd command. You can create a new user with your desired UID from the terminal using the useradd command. Step 01: Create a New User With a Specific UID in Ubuntu I have illustrated the full process in the following 2 steps. In the following example, I will create a new user named “ rick” with a specific UID 2013. ![]() Creating a User With a Specific UID in Ubuntu Finally, Verify the UID & GID of the newly created user using the id command.Ī.Then, Add a new user with a specific UID & the specific GID using the useradd command with the -u option(for UID) and the -g option(for GID) in Ubuntu.Next, Verify the GID of the newly created group.First, Create a group with the specific GID you want using the groupadd command and the -g option in Ubuntu.
0 Comments
Leave a Reply. |