Last Updated on October 23, 2022 by InfraExam

Ch6 User and Group Accounts Exam

  1. File that contains the login shell used by users on the system is the ___________ file (provide complete path name). 

    • /etc/passwd 
    • /etc/login.def
    • /bin/bash 
    • /etc/default/users
  2. A normal (non root) user has which type of access to the /etc/passwd file?

    • Read and write 
    • Read only 
    • Execute, read, and write 
    • Write only
  3. The /etc/passwd file can be modified by which of the following?

    • Group account 
    • Any user 
    • Remote user 
    • Root user
  4. A normal user, joe has the following record in the /etc/passwd file. What does the x indicate?joe:x:1021:1020:purchase_dept_user:/home/usr/joe:/bin/bash

    • The encrypted password has been stored in the /etc/shadow file 
    • Password for user joe is x 
    • The joe user has not yet set his password 
    • Password for user joe is locked
  5. Refer to following record in the passwd file: test_user:x:521:520:hr_dept_user:/home/usr/test_user:/bin/bash

    The UID and GID for test_user are, respectively: 

    • 521 and 520 
    • 521 and 1041 
    • 520 and 521 
    • 21 and 20
  6. Which of the following info about users is not present in passwd file record? 

    • The user’s account name 
    • The user’s shell 
    • The user’s password 
    • The user’s home directory
  7. The ________ command can be used to display user information, including information from the GECOS field. 

    • chage 
    • passwd
    • finger 
    • usermod
  8. Regular users can modify their GECOS information using which of the following commands?

    (choose two)

    • chfn 
    • set 
    • passwd 
    • finger
  9. Which of the following commands cannot be used to update user information in the /etc/passwd file?

    • finger
    • usermod 
    • chfn 
    • useradd
  10. The root user cannot convert the password of any user into readable text form.

    True or False?

    • True 
    • False
  11. Which of the following information is not stored in the /etc/shadow file?

    • Maximum number of days remaining for the password to expire 
    • Encrypted password 
    • Days since last password change 
    • Default home directory
  12. A regular user wants a password that never expires. The Maximum field value in the /etc/shadow file should be set to:

    • No value 
    • 99999
  13. The system administrator wants to create a temporary user account to be used for only seven days. Immediately after seven days, the account should become unavailable for login. The following values should be set for the temporary user in the shadow file: 

    • Maximum=7
    • Minimum=7 
    • Expire date=today+7 
    • Warn=7
  14. Password aging policy for individual users can be set using the ________ command.

    (choose two)

    • grep 
    • usermod 
    • getent 
    • chage 
    • passwd
  15. In the /etc/shadow file, a user record has !! as the first two characters in the encrypted password field. What does this signify?

    • No significance, it is encrypted text 
    • The password has !! as the first two characters 
    • The password is about to expire 
    • The account is locked
  16. The root user can use which of the following commands for locking and unlocking a user’s account:

    (choose two)

    • moduser 
    • passwd 
    • usermod 
    • password
  17. The system administrator wants to make the password empty for user Don. The administrator should execute the passwd command with which of the following options?

    • -d Don 
    • -a Don 
    • -u Don 
    • -l Don
  18. File used to define and manage the configuration of shadow passwords for new user account is the_________ file (provide complete path name). 

    • /etc/login.defs 
    • /etc/ 
    • /etc/passwd 
    • /etc/shadow
  19. A Linux administrator modifies the values of UID_MAX and UID_MIN parameters in the /etc/login.defs file. This in effect will allow her to:

    • Assign UID within the specified range for new users 
    • Assign UID and GID within the specified range for all users 
    • Change password expiration policy for existing users 
    • Assign GID within the specified range for new users
  20. The research team for ABC Corp is being increased from one to five members. What is the best way to add new team members to the server?

    • Create a group named research , with each member given an account belonging to the group. 
    • Add new users with blank passwords
    • Create a new login account named research that all new members share 
    • Create individual users and assign them root privileges
  21. A user is a member of three different secondary groups. Which file will contain information regarding his membership in these secondary groups?

    • /etc/group 
    • /etc/passwd 
    • /etc/shadow 
    • /etc/login.defs
  22. The ___________ command can be used to display group membership for a particular user.

    • newgrp 
    • groups
    • showgrp 
    • getent
  23. The groups command displays your current primary group as the first group while the getent command will always display the default primary group.

    True or False?

    • True 
    • False
  24. An account on a Linux system has a UID of 50. Which type of account is this?

    • Regular user account 
    • Group account 
    • System account 
    • Temporary account
  25. Which option, when used with useradd command, will display the default options that are used when creating a new user?

    • -D 
    • -e 
    • -m 
    • -f
  26. A new user was created using the command useradd steve. The command grep steve /etc/shadow will show the password field for this account as:

    • Null 
    • Blank
    • !
  27. Running the command useradd jen on a system with User Private Groups will create:

    • A user jen and login directory is created 
    • Only a new user jen is created 
    • A user jen and a group jen both are created 
    • Only a group jen is created
  28. The __________ command is used to assign a group administrator.

    • grpadmn 
    • assign 
    • gpasswd 
    • newgrpadm
  29. Changes in the /etc/skel directory will apply to:

    • New users created using useradd command 
    • New users having their home directory in /etc/ 
    • None—the /etc/skel directory has no effect on user accounts 
    • All existing users
  30. Root user can change password for any user using ________ command.

    • passwd 
    • usermod 
    • change 
    • passwdmod
  31. The command passwd -S test_user produces the following output: test_user NP 03/28/2014 0 99999 7 -1

    What information does this convey regarding the password status of the test_user account?

    • Locked password 
    • There is no password 
    • Set but non-printable password 
    • New password stored in /etc/shadow
  32. Using the command passwd -e test_user, the root user can force a password change in the next login attempt.

    True or False?

    • True 
    • False
  33. The chage command cannot be used to:

    • Update information related to password expiry 
    • Delete a user 
    • View password aging policies 
    • Enforce a password changing and expiry policy for specific user accounts
  34. Which of the following commands will set the grace login period of 10 days after the password has expired?

    • chage –W 10 temp_user 
    • chage –E “2020-06-01” temp_user 
    • chage –m 5 temp_user 
    • chage –I 10 temp_user
  35. The ____________ command used to modify a user account.

    • usermod 
    • modify 
    • grep 
    • passwd
  36. The lori user reports that their account is locked. Which of the following commands will unlock the user’s account?

    • usermod lori -e 2020-0430 
    • usermod -L lori 
    • usermod lori -g sales 
    • usermod -U lori
  37. The system administrator wants to delete the joe user account. However, joe is already logged in to the system. Which of the following commands will allow the administrator to delete joe?

    • userdel joe_user 
    • userdel -f joe_user 
    • usermod -d -f joe_user 
    • userdel -r joe_user
  38. Which of the following commands will allow the root user to create a new group for the sales department and assign this new group the GID of 1250?

    • Specific GID cannot be assigned 
    • groupadd sales_group -n 1250 
    • groupadd sales_group -g 1250 
    • groupadd sales_group 1250
  39. The ____________ command can be used to change the group name.

    • grpchange 
    • usermod 
    • groupmod 
    • modify
  40. The system administrator notices that a file shows a numeric group id 1508. What does this signify?

    • The system has been hacked 
    • The file belongs to a system group id 
    • Group name corresponding to GID 1508 is deleted 
    • Group name is 1508