Which file lists which users can execute commands using sudo? (Specify the full name of the file, including path.)
正解:
etcsudoers Explanation: The /etc/sudoers file lists which users can execute commands using sudo, as well as which commands they can run, on which hosts, and as which users. The /etc/sudoers file is the main configuration file for the sudo command, which allows users to run commands as another user, usually the superuser or root. The /etc/sudoers file has a specific syntax and should be edited only with the visudo command, which checks the file for errors and locks it to prevent concurrent edits. The /etc/sudoers file contains entries that follow the format: user host = (runas) command where user is the name of the user who can run sudo, host is the name of the host where the user can run sudo, runas is the name of the user as whom the command will be executed, and command is the name of the command or a list of commands that the user can run with sudo. For example, the entry: alice ALL = (root) /bin/ls, /usr/bin/whoami means that the user alice can run sudo on any host, and can execute the commands /bin/ls and /usr/bin/whoami as the root user. The /etc/sudoers file also supports aliases, variables, wildcards, and other features that make it more flexible and powerful. For more details, see the sudoers manual page. Reference: LPIC-1 Exam 102 Objectives, Topic 110: Security, Subtopic 110.2: Use sudo to manage access to the root account, Weight: 2, Key Knowledge Areas: Configure sudo and sudoers. Use sudo to execute commands as another user. LPIC-1 Exam 102 Learning Materials, Topic 110: Security, Subtopic 110.2: Use sudo to manage access to the root account, Section 110.2.1: sudo and sudoers, Page 3-5.
問題 2
How can the existing environment variable FOOBAR be suppressed for the execution of the script./myscript only?
正解: D
解説: (JPNPDF メンバーにのみ表示されます)
問題 3
Fill in Blanks The ________ command is used to add a group to the system.
正解:
groupaddusrsbingroupadd Explanation: The groupadd command creates a new group using the options specified on the command line and the default values from the /etc/login.defs file. It adds an entry for the new group to the /etc/group and /etc/gshadow files. Only the root user or a user with sudo privileges can create new groups using this command. The general syntax for the groupadd command is as follows: groupadd [OPTIONS] GROUPNAME Some of the common options for the groupadd command are: -g, --gid GID: Specify the numeric group ID for the new group. If not given, the system will assign the next available GID from the range of group IDs specified in the login.defs file. -r, --system: Create a system group with a GID chosen from the range of system group IDs specified in the login.defs file. System groups are usually used for some special system operation purposes, like creating backups or doing system maintenance. -f, --force: Suppress the error message if the group already exists and exit successfully. This option is useful for scripts that need to ensure the existence of a group. -K, --key KEY=VALUE: Override the default values from the /etc/login.defs file. The valid keys are GROUP_MIN_ID, GROUP_MAX_ID, SYS_GROUP_MIN_ID, SYS_GROUP_MAX_ID, and GID_INCREMENT. Reference: https://linuxize.com/post/how-to-create-groups-in-linux/ https://linuxhandbook.com/groupadd-command/
問題 4
What is true regarding a default route?
正解: A
解説: (JPNPDF メンバーにのみ表示されます)
問題 5
What is Irue regarding public and private SSH keys? (Choose TWO correct answers.)