[Solved]Task 5 Managing Groups Execute Following Commands Root Command Line Environment Jones Sam Q37250606
Task 5: Managing Groups
Execute the following commands in the rootcommand-line environment:
# for i in jones sam henry john smith; do useradd $i;done
Check whether users jones sam henry john smith are created
# tail /etc/passwd
# groupadd friends
# for i in jones sam henry john smith; do gpasswd -a $ifriends;done
Check whether users jones sam henry john smith are added togroup friends
# tail /etc/group
# userdel henry
# usermod -L jones # chage -d 0 jones
# python
>>> import crypt;print crypt.crypt(“password”,”pen”)
>>>
Press CTRL d to exit
Use the mouse to copy the encrypted string.
# usermod -p <paste encrypted string here>jones
The angle brackets (< and >) are NOT part of thestring!
# grep jones /etc/shadow
# chage -M 2 john
# passwd sam
# useradd bill
# gpasswd -a bill friends
# chage -M 3 smith
Explain change –M command. What is the final output?
__________________________________________________________________________________________________________________________________________________________________________???
Expert Answer
Answer to Task 5: Managing Groups Execute the following commands in the root command-line environment: # for i in jones sam henry … . . .
OR

