RHCSA EXAM QUESTIONS AND VERIFIED ANSWERS 2024
how to add into sudoers user how to setup sudo for a user - correct answer echo /etc/sudoers.d/user01 user01 ALL=(ALL) ALL you can do like this....OR in the file user20 ALL=(ALL) NOPASSWD:ALL usermod -aG wheel user visudo -- %wheel ALL=(ALL) ALL how to add the sudoers group and give access - correct answer To enable sudo access to the group named gourp01 echo /etc/sudoers.d/group01 %group01 ALL=(ALL) AL configuring password ageing - correct answer chage command will do this: m=maximum, W warning, I inactivity 1- force user to change the password on the next login 2- display the information about user 3- expire account on 2-2-2020 4-command to expire the account and lock the command in same command. 5- asign no login shell 6- change the password policy for the consultant account to require a new pass every 15 days 7-Set the passwords to expire 180 days from the current date for all users. Use administrative rights to edit the configuration file. 8- The chown command can also be used to change group ownership of a file by preceding the group name with a colon (:). For example, the following command changes the group test_dir to admins: 9-The chown command can also be used to change both owner and group at the same time 10- how to unlock the user - correct answer 1- chage -d 0 user01 2- chage -l user01 3- i- # date -d "+45 days" +%F ii # chage -E user01 4- chage -L -e 2019-0-05 user01 5- usermod -s /sbin/nologin user01 6- chage -M 15 consultant 7-Set PASS_MAX_DAYS to 180in/etc/. Use administrative rights when opening the file with the text editor. You can use the sudo vim /etc/ command to perform this step. 8-chown :admins test_dir 9-chown visitor:guests test_dir #chown filename 10- usermod -U username
Document information
- Uploaded on
- May 8, 2024
- Number of pages
- 30
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers