Linux - Advanced user and group management
20K views
Nov 28, 2024
Linux - Advanced user and group management
View Video Transcript
0:00
Into this video now we are going to see the advanced user and group management
0:05
Into our earlier video we have seen how we can create the user or how we can add the group
0:11
Now here we are going to check how we can create the user along with changing the entry while creating the user itself
0:17
Now if I'm going to create the user, we have used the user add commands to add the user
0:23
which creates your owner groups, your home directory, your password encryption as well as the group and user GIDs
0:30
is user IDs and your group IDs. Now if I want to change this into my user creation command itself, like in user add itself
0:39
I can give the command user add space hyphen D so that we can directly change the home
0:44
directory of the user to some other place while creating the user itself
0:49
Same way we can use hyphen P command so that we can change the password while creating the
0:54
user itself. Then we can also use the user ad hyphen u command, we can change the user ID command
0:59
of this user and we can assign our own user IDs which should be greater than 500 and the users you have created
1:08
then we have user add hyphen g hyphen g will be changing the group idea of the user
1:14
during creation of the user itself same way during creation of the group we have also used a command group ad
1:22
so during the creation of the user you can also create a supplementary user into the Linux operating system
1:28
or you can change the group ID by giving the command group add hyphen G and the group ID can be changed but later on if you have changed the group ID of the user you have to also change it into the pass wd files so that your user is directly connected to the group you have created So here we be seeing how to create a supplementary group IDs as well as how we
1:50
be adding these groups into the users. Along with that, this changes we are doing it manually while creating the user
1:58
Now if I want to make this changes permanently into my user accounts or the group accounts
2:03
what we can do. We have to modify a file code as a default
2:07
file. So I'll be making changes into the default user files and so that all the users
2:12
which I'm going to create later on will have the same entries by default into it. So how
2:17
we are going to do that that we are going to see into our terminal. So let us begin with
2:21
our terminal now. So into earlier session we have seen how we can add the user. So we have
2:26
used the command user ads for adding the user but we have also modified user entries
2:32
by using the user more command. Now what if I want to do it
2:37
the modifications by user at command itself. So you also have different parameters
2:43
like if I want to change the home directory of my user to OPT
2:47
and here I want that my user's home directory should be created with the same username, User 1
2:53
And again, I want that the user ID should be different, so I can also define user ID
2:58
I want it should be 008. And then I want to define the password of the user
3:06
also define it over here itself like I want that it should be a B C at rate 1 to 3
3:12
and again I can define the group ID of the user over here that my group ID which the
3:49
H, hyphen P, the password I'm going to set 1 to 3, hyphen G, 1008, and user 1
4:06
Okay, so this does not exist. So I'll just remove this group right now
4:19
and post that we can create the group ID as well. So this is what exactly we have seen
4:24
Now you can check into the slash prog. Even if I want to check the last 10 commands
4:29
I can also use tail command. Tail for last 10 lines. And I can use head for first 10 lines
4:38
So I'm going to check the last 10 lines here. You can check. It's created with the same user ID and the group ID
4:46
Opt user 1. and this is the pin slash that is we have so during you create the user itself you
4:53
can make the changes this is again advanced entries and really we have same way
4:58
we can check for the password of the user like if I getting login with the limited user here that is my trainer and trainer want to switch user to my the new user user 1 Now the password will be 1 2 3 itself for getting login from the user
5:14
So I have wrongly entered the password here. So again I'll get login
5:31
Assue user 1 and 1 to 3 now I'm logged in through this user so this is how generally we can create by using the different parameters of your user
5:44
I can also add the group by using the same parameters group at hyphen g I can define the group ID from here itself whatever it is free I can use it and I am going to define it as demo so you can also check the group by using
6:01
until the last 10 lines showing you the group is created with group ID 100Mine
6:09
So this is the way how you can use and create a user and a group using the user ad and your
6:14
group ad command and modifying the users over there itself. So this is what we have seen into the NIC operating system by just modifying it by user ad
6:23
in spite of using your user more. So user more can be used once you have already created the user
6:29
While creating the user itself, you want to modify the entries, you can use the parameters of your same user add command
6:36
So this is what we have seen, how we can add the users into the Linux operating system
6:42
And the next we are going to check for the password entries and how we can manage the passwords
#Computer Education
#Operating Systems
#Programming
#Training & Certification