All right, now it's time to talk about user and group management.
So actually for that, we will use this comment.
So we have the ad user comment and we have that user add comment.
But by the way, I prefer ad user.
Now, what is that?
Actually, they are the same under the hood.
Ad User Command used the end user comment because this user comment is something within the system.
By the way, you can read more about them.
What is the difference?
But for now, let's just add user, because it is much faster and easier because ad user, I will add
that user, for example, so you can see only the old can do that.
So it do shift one, shift one like that.
And yeah.
What is the password.
One, two, three, one, two, three.
I think.
One, two, three, one, two, three.
By the way, for name no other as this, correct.
Yes.
Or Bressington.
Because you can see that the way is capital, which means this is the default behavior.
So yeah.
So now I have that user test now using user mode.
It is the same by the way, but you will not provide the home directory, as you can see at user create
home director for you and actually add user.
By the way, you can add this user to another group using the same command, just typing the same command,
which is to the add user and name of the group, which is in my case, I will put it inside the SUDO
group so it can enable Orkan so it can execute route commands as a route privilege.
But for now I would not put it until I show you this something.
So I will use the Soudas to test.
OK, and we already saw that, by the way.
So here we go inside the suit test again.
Let's use the Desh option, by the way, or the DECIR, so you can see that here we are inside the test
user this time, as you can see this time it is just here.
So if I typed Sudo as.
It would ask me for it for sure, but if I that you can see this is not in the suit was filed, this
incident would be reported.
OK, so how to do such a thing because that the user is not inside the suit or the suit brought, by
the way.
So if I type I can see the groups is only.
This or if I type the groups of command, which is this only, so I will control these or exit to look
out or exit from the shill for their biggest user.
And then if you get the ATC group.
This is where all of the groups in the system, you can see that we have the root and the jihadi, which
is the group identifier, is zero, which means anything with this zero, which means it has the root
privilege.
So if you can edit the group, by the way, it is readable.
It is readable only for everyone, but no one can modify it, only the root.
So if you modify the idea for you, if I scroll down, so for example, list that list, it has this
idea or did.
OK, this is for the group.
So if I modify this, it will as a zero, it will give me as root privilege.
But this is not the best practice to do that.
So if I hear something else or find another file, which is something called the HTC Basswood, and
here inside it you can see that, yeah, we have it here.
So you can see that it has a lot of information, the name of the user X..
Now, what is this?
Which means that we have the password for this user inside another file called XY Shadow.
We will see right away.
Don't worry, this is there you ID the user identifier.
This is the idea that the group identifier and by the way, we already saw that in their groups.
And here are some of the information values you want to convert.
And here is the home directory for the user.
And here is the Basche or the default product, which has been Besch.
OK, so sometimes we can put Binford's or PIN or use a bit Isbin again, as you can see, sometimes
if we don't need to be for that user to be to have additions like, for example, this here or they've
been here because, you know, locations right now find it is have another log on or a log on the shadow
file.
But you can see permission denied because this shadow, why it has that hashed password for all the
users.
So it's means that the password for the user is hashed and stored inside their shadow.
So if I open it, yeah, you can see that the test user, which is this one, it has this password or
this hash password.
OK, and you can see that it has a lot of information.
A lot of that is whatever.
OK, so actually this is the hash for one, two, three, one, two, three.
You already saw the password, something very simple.
By the way, if I go again to the best with file here like this, you can see if I edit this one or
this one to zero, OK, or the two of them to zero, which means that this is the root user.
Let's scroll up a little bit.
Yeah, here it is.
So you can see that this is the root user and it has a password and it is hash there and zero zero,
which means this user ID and the idea zero, this is the root user.
So the user is not just about user one.
It is a very balkwill and root action because it is called root by the way, because it has the zero
uid and did.
Right.
Look, you know that no, I want for that this to be added to another thing, OK?
So if you click or clack ethnic groups, by the way, OK, you can see that for the open to use.
Here it is for the user sorry, the group group.
But if I screw up a little bit, you can see that we will have the pseudo where it is.
Yeah, here it is.
You can see that this is the through the group and it has inside the Ubuntu user and Mavor user.
Now we want to add actually that this user inside that pseudo user, the soda group, I mean this user
inside the pseudo group to perform a pseudo commands using this to do was find that we already learned.
So add user as simple as that.
You can see that because using the add user is very simple and it will get rid of a lot burden actually.
So add user the name of the user that already existed.
Now put it to sudo.
A symbol, of course, it will ask for permission so you can see that you're adding user to group tudo
adding user to this to group sort of done.
So if I type if I go the to that protest.
You can see that this time it give me this information, but anyway, but what the ID now we have that
the groups that this watch and the pseudo and if I type groups here as well, it has that this pseudo
if I'm the ethnic group again, you can see inside it, if I scroll up for the pseudo group, we have
a window MABA and test.
All right.
And by the way, that test user is the same is here, OK, because by default in Linux, every user
you create, it will come with a group, it will create a group will be created automatically with the
same name.
So yeah, it has a user and group.
I have this user MABA, it has this group matter as well.
Now by the way, they're using their user ad actually.
Yeah.
I'm not saying it's bad or something actually.
By the way, under the hood ad user is using m combine combination of commands which is user ad and
something called user mode.
OK, so after you user ad you create user mode, you put options to create directories or a home director
or something.
OK, ok, so that's why I recommend you to use add user.
Actually it's much simpler and it's not about what they are the same nor security reasons or the performance
and, and whatever.
OK, they are the same but the user is very simple.
Just add user the name of the user and then add user group.
You want to add it to whatever you want.
By the way, if I type add user and for example, let's add this one, just one is not existed.
And what do this will not work even if I type suitable privilege.
I mean.
Now, why is that?
Now here you can see Sudo ad user, this one pseudo does, as you can see, that this one does not exist.
So I need to add it first like this.
And with whatever options I want.
Or whatever, a password, and here then I can add it here.
By the way, if I add it again, it will not work because see that the user is already existed.
But if I added sudo with the group, I mean, yeah, it would work fine.
And if I add again, by the way, it will not work because that this one is already a member of the
pseudo no add user here.
Actually it worked like that.
Actually it's not like workaround or something.
Now the command itself provides such a thing which is creating users and adding users to groups.
OK, all right.
So far, so good.
And if you want or if you are curious how to use the user, add, you can read more about it.
Actually, it's not the third, by the way.
You can use the two commands user add and with that user mode as well to add a user to specific groups.
But anyway, I'm not using it.
I'm using the user now how to delete the user.
It is again, it is the same source.
And so if I type man or the ideal user, this is the command we will use.
So you can see this is to delete.
We can't we have delete user delete group.
This is to remove a user or group.
OK, so if I thought delete user.
And I tried to provide or provide the name of it, which is this.
And yeah, of course, I forgot that then you can see that that this Tuzer is now removed.
OK, and again, let's remove that.
Just one, by the way, is the same.
Now, I checked ATC to see if it is there or not.
You can see that it is not here.
If I can see Beswick to see if the user is there.
No, it is not there.
OK, so if I checked with pseudo permission that ATC shadow, just in case you can see that as well,
it is not there.
All right.
So it is clear the screen and I want to show you something.
So if I go to the home directory, actually, you can see that even though the user is removed and its
group is removed and it is removed.
By the way, if I screw grown up here.
So if you.
Yeah, let's get the ATC group again.
So as you can see, catechesis group.
And if you scroll up to until you reach the pseudo so you can see that it is removed from the study
group as well.
So it is it has been deleted immediately or completely from the system, but while it is still on the
home directory.
Now, this is something that you may you may say this something bad or wrong.
This is wrong.
No, actually, this is the best practice, by the way, because, for example, you have a specific
user and he or she done specific commands in the past.
OK, and you would you want to this they was not remove it completely.
So that's why that's the command gift, its home directory.
So which means every file, each commands in the history or each thing will be there so we can access
it.
So imagine if I am a road user so I will not put that currently emerald user and I can go inside whatever
I want.
So here you can see that I am opening everything inside is the best history, the best look out because
you provide anything here I can find it.
And the is or autist one, by the way.
Nobody actually that will use up option here.
You can see that we have option which is delete the home directly so I can then use it again.
You can see that we have it here.
Let's search about it.
I would give you as you can see, we have this option, which is remove home, as you can see.
So this is to remove the home directory of a user.
It's a wall of backup that after having the form so that it does remove home, it will remove the home
directory for the current user.
Let's have a real quick test.
Don't worry.
So if I didn't use just again and with pseudo permission.
You can see that the that does not exist.
All right.
So if I type it again, but this time with that, it does remove Dash home, which is the option we
saw.
All right, now if I type unless you can see that it is still here.
Why?
Because, yeah, we have it.
So let's add look at user test this time.
As you can see, the data already existed, so one, two, three, one, three, one, two, three.
One, two, three.
Whatever things.
OK.
So if I type A. Yeah, it is here and this is here, so I want to delete user with studio permission.
The user.
Yes that's Desh.
Remove Deshwal.
All right, if I type at this time, OK, so the test has been deleted that this user as well as that
is the group, as well as the test directory, home directory for the test user.
So everything is working as expected.
Or I can just remove it immediately like this.
So if I have pseudo or under-sheriff that just one.
And untreated, you can see that I already did the list one directory or thanks for watching.