Administrative Tasks Flashcards

1
Q
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
A

chage

passwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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.

A

Only root is allowed to read and write /etc/shadow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
Which of the following commands will convert files from one character encoding to another?
A. convert
B. enc2utf
C. iconv
D. transcode
A

iconv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
Which environment variable will override all LC_* variables?
A. LANG
B. LC_ALL
C. LC_COLLATE
D. LOCALE
A

LC_ALL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

ln -s /usr/share/zoneinfo/UTC /etc/localtime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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.

A

C. Add the specific user to the /etc/at.deny file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.

A

The commands of a batch job run sequentially one after another while the commands in at jobs may run in parallel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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.

A

Because user specific crontab entries are stored in a special directory which is maintained by the cron daemon and not writable for regular users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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.

A

There are distinct number spaces for UIDs and GIDs, i.e. the same number may be used as both a UID and a GID.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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.

A

The password becomes invalid which disables password based logins although other login methods remain usable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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.

A

C. The time when the cron job should run.

D. The command that should be started by the cron job.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
Each entry in a crontab must end with what character?
A. Tab
B. Space
C. Backslash
D. Newline
A

D. Newline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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].

A

Add the specific user to /etc/at.deny file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
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
A

30 0-23 * * 0 myscript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
Which of the following files assigns a user to its primary group?
A. /etc/pgroup
B. /etc/shadow
C. /etc/group
D. /etc/passwd
E. /etc/gshadow
A

/etc/passwd

17
Q
Which of the following commands should be added to /etc/bash_profile in order to change the language of messages for an internationalized program to Portuguese (pt)?
A. export LANGUAGE="pt"
B. export MESSAGE="pt"
C. export UI_MESSAGES="pt"
D. export LC_MESSAGES="pt"
E. export ALL_MESSAGES="pt"
A

export LC_MESSAGES=”pt”

18
Q

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.)

A

/etc/cron.allow

19
Q
Which commands can be used to change a user's account aging information? (Choose THREE correct answers.)
A. usermod
B. passwd
C. chattr
D. chage
E. chsh
A

A. usermod
B. passwd
D. chage

20
Q

Which command is used to add an empty group to the system? (Specify ONLY the command without any path or parameters.)

A

groupadd, /usr/sbin/groupadd

21
Q
What is not contained in the locale setting of the operating system? 
A. currency symbol
B. language
C. timezone
D. thousands separator
A

timezone

22
Q

What is true about the file /etc/localtime?
A. It is a plain text file containing a string such as Europe/Berlin.
B. It is created and maintained by the NTP service based on the geolocation of the system’s IP address.
C. It is a symlink to /sys/device/clock/ltime and always contains the current local time.
D. It is either a symlink to or a copy of a timezone information file such as /usr/share/zoneinfo/Europe/Berlin.

A

It is either a symlink to or a copy of a timezone information file such as /usr/share/zoneinfo/Europe/Berlin.

23
Q

What is true regarding the command userdel –force –remove bob? (Choose TWO correct answers.)
A. The user bob is removed from the system’s user database.
B. The user bob’s home directory is removed.
C. The locate database is updated to drop files owned by bob.
D. All files owned by bob are remove from all mounted filesystems.
E. In case bob was the last member of a group, that group is deleted.

A

A. The user bob is removed from the system’s user database.

B. The user bob’s home directory is removed.

24
Q

Which of the following fields can be found in the /etc/group file? (Choose THREE correct answers.)
A. The list of users that belong to the group.
B. The home directory of the group.
C. The name of the group.
D. The description of the group.
E. The password of the group.

A

The list of users that belong to the group.

The name of the group.

The password of the group.