This will prompt you to type and verify a new password. Where USER is the new username we created.
#How to add a user account in ubuntu password#
To do that we first must set an initial password with the command:
However, we’re going to set the password such that the user will have to change their password upon first login. Next, we need to set the password for the user. We include the -m option to ensure the home directory is created along with the user. You’ve just created a new user and given them sudo privileges on Ubuntu Server. For this we’ll use the usermod command like so: With the new user created, it’s time to give them sudo rights. The adduser command will also automatically create the new user’s home directory, so you don’t have to worry about that. The adduser command will not only have you create a password for the user, but also have you enter the following (optional) details: Where USERNAME is the name of the user you want to add. The first command will create the new user: Here, you can take care of creating the user with only two commands.
#How to add a user account in ubuntu how to#
How to create a sudo-able user on Ubuntu Serverįirst, we’ll demonstrate how this is done on Ubuntu Server. SEE: Linux service control commands (TechRepublic Premium) What you’ll need I’ll demonstrate this on both Ubuntu Server 20.04 and CentOS 8, so you should be able to handle the task no matter what distribution you’re on. In fact, I’m going to walk you through the process of creating an admin-ready user on Linux with just a few quick commands. Problem is, when you create a new user, that user doesn’t have admin privileges. You create new users on your Linux servers and let those admins do their thing. After all, if you attempt to do everything yourself, eventually you’re going to make a mistake, and mistakes can be disastrous in today’s light speed world of business. That’s why you dole out tasks to those admins under you. There’s a lot to be done and doing this with a nod to security makes the task even more challenging. If you’re a Linux system admin, you probably find yourself scrambling to keep everything in check every day. The 10 best antivirus products you should consider for your businessĨ enterprise password managers and the companies that will love themĮnd user data backup policy (TechRepublic Premium) How Russia’s invasion of Ukraine will affect your cybersecurity