Which commands can be used to change a user's account aging information? (Choose THREE correct answers.)
정답: A,B,C
설명: (Krdump 회원만 볼 수 있음)
문제 3
What is the purpose of the nsswitch.conf file?
정답: C
설명: (Krdump 회원만 볼 수 있음)
문제 4
In which file, if present, must all users be listed that are allowed to use the cron scheduling system? (Specify the full name of the file, including path.)
정답:
etccronallow Explanation: The /etc/cron.allow file is a file that contains a list of users who are allowed to use the cron scheduling system. The cron scheduling system is a way of running commands or scripts at specified times or intervals. Users can create their own cron jobs by using the crontab command, which edits a file called crontab that stores the user's scheduled tasks. However, not all users may have access to the crontab command or the cron system. The access is controlled by two files: /etc/cron.allow and /etc/cron.deny. If the /etc/cron.allow file exists, then only the users listed in this file can use the crontab command and the cron system. The file should have one user name per line. If the /etc/cron.allow file does not exist, then the /etc/cron.deny file is checked. If this file exists, then the users listed in this file are denied access to the crontab command and the cron system. If neither file exists, then the access depends on the configuration of the cron daemon, which is the program that runs the cron jobs. By default, only the root user can use the cron system if no files exist. The root user can always use the cron system regardless of the existence or content of these files. To create or edit the /etc/cron.allow file, the root user needs to use a text editor such as vi, nano, or emacs. For example, to allow the users alice and bob to use the cron system, the root user can use the following command: sudo vi /etc/cron.allow And then add the following lines to the file: alice bob And then save and exit the file. Reference: How cron.allow and cron.deny can be used to limit access to crontab for ... /etc/cron.allow - Linux Bash Shell Scripting Tutorial Wiki Linux / UNIX Restrict at / cron Usage To Authorized Users
문제 5
What command can be used to generate syslog entries of any facility and priority? (supply just the command name without a path)
정답:
logger Explanation: The logger command can be used to generate syslog entries of any facility and priority. It is a shell command interface to the syslog system log module. It allows users to write messages to the system log from the command line or from a script. The logger command supports several options to specify the facility, priority, tag, message, and other attributes of the log entry. For example, the following command generates a log entry with the facility user and the priority info: logger -p user.info "This is a test message" The facility and priority can be any of the values defined in the syslog protocol, such as kern, mail, auth, local0, etc. for the facility, and emerg, alert, crit, err, warn, notice, info, debug, etc. for the priority. The default facility is user and the default priority is notice. The logger command can also read messages from standard input or from a file. For more information, see the logger man page or the logger - Linux man page online. Reference: Syslogs in Linux: Understanding Facilities and Levels What are Syslog Facilities and Levels? - Trend Micro syslog-ng Open Source Edition 3.30 - Administration Guide Syslog Logging Guide: Advanced Concepts - CrowdStrike