Home
You may like this!
21.
Which of the following is a legal Linux username that will be accepted by useradd?
  • A.
    larrythemoose
  • B.
    4sale
  • C.
    PamJones
  • D.
    Samuel_Bernard_Delaney_the_Fourth
  • E.
    ted cho
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
A Linux username must contain fewer than 32 characters and start with a letter, and it may consist of letters, numbers, and certain symbols. The useradd utility imposes additional restrictions: Uppercase letters and most symbols are not permitted. Of these options, only option A meets all of these criteria. Option B begins with a number and so is invalid. Option C is a legal Linux username but won’t be accepted by useradd because of its uppercase letters. Option D is too long to be legal at 33 characters, and it contains uppercase letters and underscore symbols. Option E is a legal Linux username but won’t be accepted by useradd because of the space in the name.
Report
Name Email  
22.
Why are groups important to the Linux user administration and security models?
  • A.
    They can be used to provide a set of users with access to files without giving all users access to the files.
  • B.
    They enable you to set a single login password for all users within a defined group.
  • C.
    Users may assign file ownership to a group, thereby hiding their own creation of the file.
  • D.
    By deleting a group, you can quickly remove the accounts for all users in the group.
  • E.
    They enable you to link together the account databases in a group of two or more computers, simplifying administration.
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
Groups provide a good method of file-access control, as described in option A. Although they may have passwords, these are not account login passwords, as option B suggests; those passwords are set on a per-account basis. Files do have associated groups, but these are in addition to individual file ownership and so they can’t be used to mask the file’s owner, making option C incorrect. Deleting a group does not delete all the accounts associated with the group, so option D is incorrect. Groups are not fundamentally a crosscomputer construct, contrary to option E. (This option describes the function of network account databases such as LDAP accounts or Active Directory.)
Report
Name Email  
23.
An administrator types chage -M 7 time. What is the effect of this command?
  • A.
    The time account’s password must be changed at least once every seven days.
  • B.
    All users must change their passwords at least once every seven days.
  • C.
    All users are permitted to change their passwords at most seven times.
  • D.
    The time account’s age is set to seven months.
  • E.
    The account database’s time stamp is set to seven months ago.
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
The chage command changes various account expiration options. The -M parameter sets the maximum number of days for which a password is valid, and in the context of the given command, time is a username. Thus, option A is correct. Options B, C, D, and E are all made up.
Report
Name Email  
24.
What is wrong with the following /etc/passwd file entry? (Select two.)
4sally:x:1029:Sally Jones:/home/myhome:/bin/passwd
  • A.
    The default shell is set to /bin/passwd, which is an invalid shell.
  • B.
    The username is invalid; Linux usernames can’t begin with a number.
  • C.
    The home directory doesn’t match the username.
  • D.
    Either the UID or the GID field is missing.
  • E.
    The encrypted password is missing.
  • Answer & Explanation
  • Report
Answer : [B, D]
Explanation :
As stated in option B, Linux usernames may not begin with numbers, so the username (4sally) is invalid. The /etc/passwd entries have third and fourth fields of the UID and the GID, but this line has only one of those fields (which one is intended is impossible to determine); this example line’s fourth field is clearly the fifth field of a valid entry. Thus, option D is correct. Option A is incorrect because, although /bin/passwd is an unorthodox login shell, it’s perfectly valid. This configuration might be used on, say, a Samba file server or a POP mail server to enable users to change their passwords via SSH without granting login shell access. Option C is a correct observation but an incorrect answer; the username and the user’s home directory name need not match. The encrypted password is officially stored in the second field (x in this example), but in practice, most Linux computers use shadow passwords, and an x value for the password is consistent with this use, so option E is incorrect.
Report
Name Email  
25.
You want sally, tom, and dale to be members of the group managers (GID 501). How would you edit the managers entry in /etc/group to accomplish this goal?
  • A.
    managers:501:sally tom dale
  • B.
    managers:501:sally:tom:dale
  • C.
    managers:x:501:sally:tom:dale
  • D.
    managers:x:501:dale,sally,tom
  • E.
    managers:501:x:dale\sally\tom
  • Answer & Explanation
  • Report
Answer : [D]
Explanation :
Option D shows a valid /etc/group entry that has the desired effect. (Note that the order of users in the comma-separated user list is unimportant.) Option A has two problems: It’s missing a password field (x in the correct entry), and the usernames are separated by spaces rather than commas. Option B also has two problems: It’s missing a password field, and its usernames are separated by colons rather than commas. Option C has just one problem: Its usernames are separated by colons rather than commas. Option E has two problems: Its password and GID fields are reversed, and its usernames are separated by backslashes rather than commas.
Report
Name Email