Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <pre>[student@workstation ~]$ lab users-review start
- Starting lab.
- Preparing serverb for lab exercise work:
- · Backing up /etc/login.defs on serverb....................... <font color="#34E2E2"><b>SUCCESS</b></font>
- [student@workstation ~]$ ssh student@serverb
- Warning: Permanently added 'serverb,172.25.250.11' (ECDSA) to the list of known hosts.
- Activate the web console with: systemctl enable --now cockpit.socket
- [student@serverb ~]$ visudo
- visudo: /etc/sudoers: Permission denied
- [student@serverb ~]$ sudo su -
- [sudo] password for student:
- [root@serverb ~]# visudo
- visudo: /etc/sudoers.tmp unchanged
- [root@serverb ~]# vim /etc/login.defs
- [root@serverb ~]# vim /etc/login.defs
- [root@serverb ~]# groupadd -g 35000 consultants
- [root@serverb ~]# echo "%consultants ALL=(ALL) ALL" >> /etc/sudoers.d/admin
- [root@serverb ~]# vi /etc/sudoers.d/admin
- [root@serverb ~]# useradd -g 35000 consultant1
- [root@serverb ~]# useradd -g 35000 consultant2
- [root@serverb ~]# useradd -g 35000 consultant3
- [root@serverb ~]# date -d "+90 days" +%F
- 2019-12-21
- [root@serverb ~]# chage -E 2019-12-21 consultant1
- [root@serverb ~]# chage -E 2019-12-21 consultant2
- [root@serverb ~]# chage -E 2019-12-21 consultant3
- [root@serverb ~]# chage -M 15 consultant2
- [root@serverb ~]# chage -l consultant2
- Last password change : Sep 23, 2019
- Password expires : Oct 08, 2019
- Password inactive : never
- Account expires : Dec 21, 2019
- Minimum number of days between password change : 0
- Maximum number of days between password change : 15
- Number of days of warning before password expires : 7
- [root@serverb ~]# chage -d 0 consultant1
- [root@serverb ~]# chage -d 0 consultant2
- [root@serverb ~]# chage -d 0 consultant3
- [root@serverb ~]# chage -l consultant2
- Last password change : password must be changed
- Password expires : password must be changed
- Password inactive : password must be changed
- Account expires : Dec 21, 2019
- Minimum number of days between password change : 0
- Maximum number of days between password change : 15
- Number of days of warning before password expires : 7
- [root@serverb ~]# exit
- logout
- [student@serverb ~]$ exit
- logout
- Connection to serverb closed.
- [student@workstation ~]$ lab users-review grade
- Grading the student's work on serverb:
- · The group consultants with GID 35000 exists in serverb...... <font color="#8AE234"><b>PASS</b></font>
- · Verifying the group membership of consultants on serverb.... <font color="#EF2929"><b>FAIL</b></font>
- · Verifying the sudo access of consultants on serverb......... <font color="#EF2929"><b>FAIL</b></font>
- · Verifying password expiry of consultants on serverb......... <font color="#8AE234"><b>PASS</b></font>
- · Verifying account expiry of consultants on serverb.......... <font color="#EF2929"><b>FAIL</b></font>
- · Verifying default password expiry of users on serverb....... <font color="#8AE234"><b>PASS</b></font>
- · Verifying password change date of consultants on serverb.... <font color="#8AE234"><b>PASS</b></font>
- Overall lab grade.............................................. <font color="#EF2929"><b>FAIL</b></font></pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement