Administrative Tasks Flashcards
Which of the following commands can modify or set the password expiration for a user? (Choose TWO correct answers.) A. chage B. chexpiration C. shadowconfig D. passwd E. userconf
chage
passwd
Which of the following statements is true regarding the /etc/shadow file?
A. /etc/shadow may not be readable or writable by user root.
B. Only root is allowed to read and write /etc/shadow.
C. All users have full read and write access to /etc/shadow.
D. All users have full read access to /etc/shadow.
Only root is allowed to read and write /etc/shadow.
Which of the following commands will convert files from one character encoding to another? A. convert B. enc2utf C. iconv D. transcode
iconv
Which environment variable will override all LC_* variables? A. LANG B. LC_ALL C. LC_COLLATE D. LOCALE
LC_ALL
Which command will set the local machine’s timezone to UTC?
A. cat UTC > /etc/timezone
B. ln -s /usr/share/zoneinfo/UTC /etc/localtime
C. date –timezone=UTC
D. mv /usr/timezone/UTC /etc
ln -s /usr/share/zoneinfo/UTC /etc/localtime
Which of the following actions prevents a specific user from scheduling tasks using at or batch?
A. Add the specific user to the /etc/at.allow file.
B. Add the specific user to the [deny] section in the /etc/atd.conf file.
C. Add the specific user to the /etc/at.deny file.
D. Add the specific user to the nojobs group.
E. Run atd –deny followed by the name of the specific user.
C. Add the specific user to the /etc/at.deny file.
What is the main difference between the batch and at commands?
A. The batch command will run multiple times. The at command will only run once.
B. The commands of a batch job run sequentially one after another while the commands in at jobs may run in parallel.
C. The at command reads commands from standard input. The batch command requires a command line argument.
D. The at command e-mails results to the user. The batch command logs results to syslog.
The commands of a batch job run sequentially one after another while the commands in at jobs may run in parallel.
Why should a regular user edit his personal crontab by using the command crontab instead of just editing his crontab file manually?
A. Because user specific crontab entries are stored in a common database and must be extracted before editing.
B. Because crontab starts the cron daemon in case it is not running due to no other crontab entries existing.
C. Because user specific crontab entries are stored in a special directory which is maintained by the cron daemon and not writable for regular users.
D. Because crontab collects information about all users crontabs and recommends similar commands used by other users of the system.
Because user specific crontab entries are stored in a special directory which is maintained by the cron daemon and not writable for regular users.
What is true about groups in a Linux system? (Choose TWO correct answers.)
A. Each user may be a member of several groups. However, only one group is the user’s primary
group.
B. Groups may have a password that allows users to join that group temporarily.
C. Each user can only be a member of one group at a time.
D. Group memberships are optional such that there may be users that do not belong to any group.
E. Groups can be nested meaning that one group can be a member of another group.
Each user may be a member of several groups. However, only one group is the user’s primary group.
Groups may have a password that allows users to join that group temporarily.
What is true about UIDs and GIDs?
A. UIDs and GIDs share a common number space. Each time a new user or group is created, the next free ID is assigned.
B. The first four digits of each UID are the GID of the primary group of that user.
C. The GID of a group is always the sum of the UIDs of its members.
D. The number space is split up. UIDs usually reside in the range from 0 to 32767 while GIDs reside in the range from 32768 to 65535.
E. There are distinct number spaces for UIDs and GIDs, i.e. the same number may be used as both a UID and a GID.
There are distinct number spaces for UIDs and GIDs, i.e. the same number may be used as both a UID and a GID.
What happens if the password of a user in the /etc/shadow file is prepended with the ! character?
A. When logging in, the user automatically gets root privileges in addition to his regular privileges.
B. The password is inverted which allows the user to log in with any password other than the current password.
C. The user is disabled and all login methods, including but not limited to password based logins, are disabled.
D. Upon the next log in, the user is forced to change his password.
E. The password becomes invalid which disables password based logins although other login methods remain usable.
The password becomes invalid which disables password based logins although other login methods remain usable.
Which of the following details can be found in an entry of a user specific crontab? (Choose TWO correct answers.)
A. The verbal description of the job.
B. The syslog facility to where the output of the job should be sent.
C. The time when the cron job should run.
D. The command that should be started by the cron job.
E. The name of the user which should run the job.
C. The time when the cron job should run.
D. The command that should be started by the cron job.
Each entry in a crontab must end with what character? A. Tab B. Space C. Backslash D. Newline
D. Newline
To prevent a specific user from scheduling tasks with at, what should the administrator do?
A. Add the specific user to /etc/at.allow file.
B. Add the specific user to [deny] section in the /etc/atd.conf file.
C. Add the specific user to /etc/at.deny file.
D. Add the specific user to nojobs group.
E. Run the following: atd –deny [user].
Add the specific user to /etc/at.deny file.
Which of the following crontab entries will execute myscript at 30 minutes past every hour on Sundays? A. 0 * * * 30 myscript B. 30 * * * 6 myscript C. 30 0 * * 0 myscript D. 30 0-23 * * 0 myscript E. 0 0-23 * * 30 myscript
30 0-23 * * 0 myscript