![]() ![]() You may notice that once executed the command, your prompt will change and indicate that you are logged in as the new user, and not root. We do this using the su command, as follows: su - vlad ![]() Now all we have to do is switch to the new user account. To do this, run the following command, replacing vlad with the user you created: $ usermod -aG sudo vlad 4. Now we’ll add our newly created user to the sudo group, thereby allowing it to execute commands with administrator privileges. Once you’ve confirmed that the information you entered is correct, your user has been created and ready for use. You can leave everything blank, and press Enter for each one to accept the defaults: Changing the user information for vladĮnter the new value, or press ENTER for the default New password:Īfter you’ve set your password, the command will create a home directory for the user, copy configuration files in the home folder and prompt you for your new user’s information. Please make sure that the password is a strong as possible. You will be prompted to enter a password you’d like to assign your new user. If you’d like to check all advantages and disadvantages of using a sudo user, instead of root, then you can find them on the Ubuntu community wiki page. Authentication expires after a short time ( this can me edited ), so if you leave the terminal open, it won’t stay open indefinitely. You don’t have to share your root account with someone that needs to do administrative tasks on your machine. They don’t know the usernames of your other users, however. Hackers know this and will attempt brute-force attacks on your server with the username root. ![]() You can check what commands were run, should something go wrong. sudo adds a log entry of the command(s) run (in /var/log/auth.log). This helps as it can make you think of the consequences of what you’re doing. It prompts you for the password before major changes can happen. You’ll often find that it’s recommended that you act as a sudo user, rather than root, when making changes to your system, as it’s more secure.Ī few of the main reasons to use a sudo user instead of root are: The sudo command makes it possible for normal users to execute commands using administrator privileges, such as root. In this tutorial we’ll create a sudo user on Ubuntu 18.04. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |