02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Creating a new User and Password on Linux

One of the first rules in any linux manual is a request not to work with the root user. As such we want to create a new user with the same powers as the root leaving us a way to log into our root in the future if we need (as an emergency user). As such we want to create a new user. In this session we will use two linux commands the passwd and the adduser to create a new user and give them a good password to keep our user safer from hackers.

Video Transcript

00:00One of the first rules in every Linux manual I've ever seen says that you shouldn't work with your root user
00:07So this is going to be the only time
00:09Really in the existence of our site that we're going to actually use our group
00:13What we want to do is we want to create a super user that will have the same powers as the root and then only use
00:19That super root user now the reason behind it is very simple
00:23The reason behind it is that we don't want to have a scenario where we damage our root user
00:29And if we damage our root user, there is no way back. We could get stuck out of our application
00:34So our root remains this kind of like
00:37Emergency access to our site while we use a child user and not the root as our main user in our application
00:45So let's see how to so even before we do that
00:48The first step we want to do is we want to change the password of our root user
00:52To do that is very simple. All you have to do is type in your command line
00:58password
00:59But it's going to be P a s s
01:02WD pass WD
01:05Once you type pass WD, it's going to automate
01:08Well not automatically is going to ask you to put a new password for your root
01:11So go ahead and put that deep that password that you like a really good one save it in your records
01:17I'm going to do that right away, and I'm going to retype that new password and
01:24And that's it we just updated our password now our root password is something that will be more familiar to us more protected
01:32Alright
01:33Now that we saved our user. It's time for us to create a new user. So let's see how you create a new user again
01:39It's very very simple. The steps involved with that is just you type the word add user space
01:45And then you type the name of the user you want. So for example, we're gonna call this demo one demo
01:52Demo one and if I type enter it's right away gonna create that user now that user needs a password as well
01:59So we're gonna use the command password again pass WD
02:04But this time instead of just typing password pass WD
02:07We're gonna put a space and write their demo one to make sure that we're gonna update demo one
02:13So if I do that, it's gonna ask now for a password for demo one. So I'm gonna put here a password for demo one and
02:19It's telling me it's a bad bad word because I put something that was way too simple. So let me put here something
02:24That's a little bit more complicated
02:29Obviously, it did not mess. So we're gonna start over again. So I'm gonna type here. Um, I
02:39Am doing something that is really dumb because I'm doing a password. That's just not good
02:44So let's let's just come up with some I'm gonna put on one of my regular passwords here
02:48Just so we don't get this message anymore
02:51All right, so I'm putting a nice little password on our user. So that's it. We created a user
02:57So what we saw in this video we saw how to
03:00Add a user we saw how to update a user's password
03:05Last but not least. I want to show you also how to delete a user

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!