A developer Kareem has been assigned Nautilus project temporarily as a backup resource. As a temporary resource for this project, we need a temporary user for Kareem. It’s a good idea to create a user with a set expiration date so that the user won't be able to access servers beyond that point.
Therefore, create a user named kareem on the App Server 1. Set expiry date to 2021-03-28 in Stratos Datacenter. Make sure the user is created as per standard and is in lowercase.
Sample Answer:
ssh <user>@<server>
sudo su
useradd kareem
#to verify kareem accout expiry date
Last password change : Oct 30, 2020
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
# comand to change the accout expiry date
[root@stapp01 home]# chage -E 2021-03-28 kareem
[root@stapp01 home]# chage -l kareem
Last password change : Oct 30, 2020
Password expires : never
Password inactive : never
Account expires : Mar 28, 2021
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
[root@stapp01 home]#
Note: **The Question copied it for learning purposes.** Commands are correct but based on your question the server, user name, and other details might differ, so please do check.
check below video too for how to do the task (i have done a sample task on Ubuntu OS)
No comments:
Post a Comment