Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. <pre>[student@workstation ~]$ lab users-review start
  2.  
  3. Starting lab.
  4.  
  5. Preparing serverb for lab exercise work:
  6.  
  7. · Backing up /etc/login.defs on serverb....................... <font color="#34E2E2"><b>SUCCESS</b></font>
  8.  
  9. [student@workstation ~]$ ssh student@serverb
  10. Warning: Permanently added &apos;serverb,172.25.250.11&apos; (ECDSA) to the list of known hosts.
  11. Activate the web console with: systemctl enable --now cockpit.socket
  12.  
  13. [student@serverb ~]$ visudo
  14. visudo: /etc/sudoers: Permission denied
  15. [student@serverb ~]$ sudo su -
  16. [sudo] password for student:
  17. [root@serverb ~]# visudo
  18. visudo: /etc/sudoers.tmp unchanged
  19. [root@serverb ~]# vim /etc/login.defs
  20. [root@serverb ~]# vim /etc/login.defs
  21. [root@serverb ~]# groupadd -g 35000 consultants
  22. [root@serverb ~]# echo &quot;%consultants ALL=(ALL) ALL&quot; &gt;&gt; /etc/sudoers.d/admin
  23. [root@serverb ~]# vi /etc/sudoers.d/admin
  24. [root@serverb ~]# useradd -g 35000 consultant1
  25. [root@serverb ~]# useradd -g 35000 consultant2
  26. [root@serverb ~]# useradd -g 35000 consultant3
  27. [root@serverb ~]# date -d &quot;+90 days&quot; +%F
  28. 2019-12-21
  29. [root@serverb ~]# chage -E 2019-12-21 consultant1
  30. [root@serverb ~]# chage -E 2019-12-21 consultant2
  31. [root@serverb ~]# chage -E 2019-12-21 consultant3
  32. [root@serverb ~]# chage -M 15 consultant2
  33. [root@serverb ~]# chage -l consultant2
  34. Last password change : Sep 23, 2019
  35. Password expires : Oct 08, 2019
  36. Password inactive : never
  37. Account expires : Dec 21, 2019
  38. Minimum number of days between password change : 0
  39. Maximum number of days between password change : 15
  40. Number of days of warning before password expires : 7
  41. [root@serverb ~]# chage -d 0 consultant1
  42. [root@serverb ~]# chage -d 0 consultant2
  43. [root@serverb ~]# chage -d 0 consultant3
  44. [root@serverb ~]# chage -l consultant2
  45. Last password change : password must be changed
  46. Password expires : password must be changed
  47. Password inactive : password must be changed
  48. Account expires : Dec 21, 2019
  49. Minimum number of days between password change : 0
  50. Maximum number of days between password change : 15
  51. Number of days of warning before password expires : 7
  52. [root@serverb ~]# exit
  53. logout
  54. [student@serverb ~]$ exit
  55. logout
  56. Connection to serverb closed.
  57. [student@workstation ~]$ lab users-review grade
  58.  
  59. Grading the student&apos;s work on serverb:
  60.  
  61. · The group consultants with GID 35000 exists in serverb...... <font color="#8AE234"><b>PASS</b></font>
  62. · Verifying the group membership of consultants on serverb.... <font color="#EF2929"><b>FAIL</b></font>
  63. · Verifying the sudo access of consultants on serverb......... <font color="#EF2929"><b>FAIL</b></font>
  64. · Verifying password expiry of consultants on serverb......... <font color="#8AE234"><b>PASS</b></font>
  65. · Verifying account expiry of consultants on serverb.......... <font color="#EF2929"><b>FAIL</b></font>
  66. · Verifying default password expiry of users on serverb....... <font color="#8AE234"><b>PASS</b></font>
  67. · Verifying password change date of consultants on serverb.... <font color="#8AE234"><b>PASS</b></font>
  68.  
  69. Overall lab grade.............................................. <font color="#EF2929"><b>FAIL</b></font></pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement