Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

linux Experiment centos experiment report #inux Experiment 5(user, group and privilege management) #task 1: create users and grant access privilege. 1. groupadd [root@localhost ~]# groupadd

linux Experiment centos experiment report

image text in transcribed

image text in transcribed

image text in transcribed

#inux Experiment 5(user, group and privilege management) #task 1: create users and grant access privilege. 1. groupadd [root@localhost ~]# groupadd user_group 2. useradd |[root@localhost ~]# useradd -d /userl -6 user_group userl [root@localhost ~]# I 3. Useradd [root@localhost ~]# useradd -d /home/user2 -6 user_group user2 [root@localhost ~]# 4. Change user password [root@localhost ~]# passwd userl userl : : 8 : passwd: |[root@localhost ~]# su userl [userl@localhost root]$ su |[root@localhost ~]# passwd user2 user2 : : : 8 ; passwd:195106 5. [root@localhost /]# mkd mkdict mkdir mkdumprd [root@localhost /]# mkdir share [root@localhost /]# chown root:user group -R share 6. Set privilege [root@localhost -]# chmod 774 -R /share [root@localhost ~]# #task 2: create users via edit configure file 1. Edit passwd file to add user3 named:x:25:25: Named:/varar userl:x: 1000:1001::/user1:// user2:x: 1001:1002::/home/use user3:x: 1002:1003::/home/use 2. Edit shadow file to set user3's password as 123 user1: $6$aKZGKHHP $A90CyF1K7/73 user2:$6$pVzrHLMGqCOKsatycezg user3! $6$pVzrHLMG$COKsatycezg INSERT 3. Edit group file to change group to user_group user_group:x: 1000:useri,user2,user3 user1:x:1001: user2:x: 1002: user3:x:1003: 4. Copy and check user envioronment configure file (/etc/skel) and set privilege [root@localhost home]# mkdir user3 [root@localhost home]# ls user2 user3 [root@localhost home ]# cd /etc/skel [root@localhost skel]# ls [root@localhost skel]# ls -a .bash_logout bash profile .bashrc [root@localhost skel ]# cp.* /home/user3 cp: BER"." cp: ".." [root@localhost skel]# cd /home/user3 [root@localhost user3]# ls -al 5 12 drwxr-xr-x 2 root root 62 5 21 16:19 drwxr-xr-x. 4 root root 32 5 21 16:18 -rw-r--r- 1 root root 18 5 21 16:19 .bash_logout -rw-r--r-- 1 root root 193 5. 21 16:19 .bash_profile -rw-r--r-. 1 root root 231 5 21 16:19 .bashrc [root@localhost user3]# cd [root@localhost home]# ls -al drwxr-xr-x. 4 root root 32 5s 21 16:18 dr-xr-xr-x. 20 root root 269 5 21 15:56 .. drwx------ 2 user2 user2 62 5 21 15:17 user2 drwxr-xr-x 2 root root 62 5 21 16:19 user3 [root@localhost home]# chown user3:user3 -R user3 [root@localhost home ]# ls -1 O drwx-- 2 user user2 62 5$ 21 15:17 user2 drwxr-xr-x 2 user3 user3 62 5. 21 16:19 user3 [root@localhost home]# chmod 700 -R user3 [root@localhost home]# ls -1 O drwx-... 2 user2 user2 62 5 21 15:17 user2 drwx------ 2 user3 user3 62 5 21 16:19 user3 [root@localhost home]# https://blog.csdn.net/mo_47195106 5. Sign in as user3 root@localhost home]# su user3 user3@localhost home ] $

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago