WEBVTT

00:01.500 --> 00:07.350
Now that we've updated our Kelly Linux install to use the latest packages and updates let's create a

00:07.350 --> 00:13.050
non-root user on the system so we can do our day to day operations on it a bit more securely.

00:14.140 --> 00:19.520
So in the video we will talk about some of the risks associated with running Kalli as root.

00:19.570 --> 00:24.850
For example if you're running as root and issue a command to wipe the entire hard drive Kelly will happily

00:24.850 --> 00:26.540
do that for you.

00:26.680 --> 00:32.470
So we're going to create a non-root user and then demonstrate how to carry out our day to day operations

00:32.530 --> 00:37.680
as this non-root user and escalate privileges only when necessary.

00:38.690 --> 00:44.330
Now that we have our base Kalli Linux install completed let's do a few additional things to make the

00:44.330 --> 00:48.470
user experience more comfortable and secure.

00:48.470 --> 00:54.010
First you'll notice that by default Kelly has the log in and run under the root user.

00:54.020 --> 01:00.050
This is a security concern because when you run commands scripts or applications under the user the

01:00.050 --> 01:07.620
system obeys the commands without hesitation for example and don't type this along with me if I were

01:07.620 --> 01:17.230
to issue this command or am space RF space forward slash and hit enter the entire contents of my Linux

01:17.230 --> 01:19.720
install would be erased.

01:19.750 --> 01:23.610
Now you would think you should warn me first before issuing such a destructive command.

01:23.680 --> 01:28.990
But it doesn't because it assumes that if I'm running as root I know what I'm doing and I'm going to

01:28.990 --> 01:30.550
be extremely careful.

01:31.600 --> 01:36.670
So to add a bit more security and kind of a sanity check for myself I'm going to create a second user

01:36.670 --> 01:38.380
on this system.

01:38.380 --> 01:43.450
This new user will still have administrative rights to the machine but whenever I issue a command that

01:43.450 --> 01:49.240
requires elevated privileges Kaleem will stop me for a moment and ensure that's what I really want to

01:49.240 --> 01:49.740
do.

01:50.890 --> 01:59.500
We're going to add the new user which I'll call Brian like so user ad space tech em space.

01:59.490 --> 02:04.010
Brian space tech capital G.

02:04.010 --> 02:18.010
Space pseudo space tech s space slash and burn slash bash the tact and means create a home directory

02:18.100 --> 02:19.500
called Brime.

02:19.810 --> 02:22.080
The tech capital G says.

02:22.120 --> 02:32.400
Add me to the group called sudo and the tech s establishes a log in shell that will be Bash hit enter

02:32.410 --> 02:34.940
and notice here I do not get any additional prompts.

02:35.200 --> 02:39.880
But one thing I'm going to want to do is set a password on my new user Brian.

02:39.910 --> 02:45.370
So I will just issue the SS W.D. command space.

02:45.480 --> 02:45.930
Brian

02:48.540 --> 02:49.680
password here twice

02:52.380 --> 02:53.120
and there we go.

02:53.120 --> 02:54.420
The user Brian is all set.

02:54.440 --> 03:00.370
So let's log out as root and log in as Brian

03:04.820 --> 03:06.350
now once I'm logged in as Brian.

03:06.380 --> 03:13.220
I can continue my regular tasks such as opening programs and editing files but when it comes to certain

03:13.220 --> 03:17.370
operations Kelly is going to warn me before continuing.

03:17.390 --> 03:23.480
For example I'm going to issue a command we learned about in the last module called apt get update this

03:23.480 --> 03:28.790
command pulls down the latest packages and their versions and it requires elevated privileges.

03:29.080 --> 03:34.390
So you'll notice that Kelly is going to barf up all sorts of errors at me when I try to issue it now.

03:38.750 --> 03:45.030
So I'm going to issue the command again and this time by putting the sudo command ahead of it.

03:45.030 --> 03:51.840
Now sudo stands for super user do and basically means trust me Kallie you can run this command with

03:51.870 --> 03:54.640
elevated privileges because I know what I'm doing.

04:01.670 --> 04:04.060
And I will see that I get a warning.

04:04.060 --> 04:06.630
Making sure that I know what I'm doing before continuing.

04:06.880 --> 04:13.530
So I'm going to type in the password that I established and now we can see that this time the apt get

04:13.560 --> 04:19.210
update command completes successfully in our next video we get to the fun stuff.

04:19.590 --> 04:24.390
We're going to look at how to begin scanning our network and create an inventory of active systems on

04:24.390 --> 04:24.510
it.
