Skip to main content

LPI E - Security Test 4

LPI Linux Essentials

Knowledge Domain Topic 5: 

Security and File Permissions

Practice Test Questions #4:

1. What is the purpose of having separate user accounts for each individual who uses a computer in a Linux networked environment?


    a) To create unnecessary complexity
    b) To grant selective access to files or services
    c) To increase system performance
    d) To reduce storage requirements

/* --------------------- */

--------------------------

1 Answer Below: 

--------------------------

/* --------------------- */

Explanation: Having separate user accounts for each individual who uses a computer allows for greater control over which files and services are accessible to each user. This can improve security and prevent accidental changes to critical files or services. It also allows for better accountability, as it is easier to track who made changes to the system if each user has their own account.

Incorrect options:
a) To create unnecessary complexity - This is not a valid reason for having separate user accounts. In fact, having a single user account for multiple users can create unnecessary complexity.
c) To increase system performance - Having separate user accounts does not have a direct impact on system performance.
d) To reduce storage requirements - Having separate user accounts may actually increase storage requirements, as each user will have their own home directory and other associated files.

1. Answer: b) To grant selective access to files or services

2. What is the purpose of the sudo command in a Linux networked environment?

    a) To grant users access to the internet
    b) To enable users to execute administrative commands
    c) To enable users to view log files
    d) To encrypt user data

/* --------------------- */

--------------------------

2 Answer Below: 

--------------------------

/* --------------------- */

Explanation: The sudo command allows users to execute administrative commands with elevated privileges, typically requiring the user to enter their own password. This allows users to perform administrative tasks without logging in as the root user, which can be a security risk.

Incorrect options:
a) To grant users access to the internet - The sudo command is not used to grant users access to the internet.
c) To enable users to view log files - The sudo command does not directly enable users to view log files, although it may be used to execute commands that allow users to view log files.
d) To encrypt user data - The sudo command is not used to encrypt user data.

2. Answer: b) To enable users to execute administrative commands

3. What is a User Private Group (UPG) in a Linux networked environment?

a) A group created for multiple users that need to collaborate

b) A group created automatically when a new user account is created

c) A group created for users who need to access the internet

d) A group created for users who need administrative privileges

/* --------------------- */

--------------------------

3 Answer Below: 

--------------------------

/* --------------------- */

Explanation: On some Linux distributions, a User Private Group (UPG) is created automatically when a new user account is created. The group and username are the same, and the only member of the group is the new user.

Incorrect options:
a) A group created for multiple users that need to collaborate - This is a valid use case for creating a group, but it is not specifically related to a User Private Group.
c) A group created for users who need to access the internet - Access to the internet is not specifically related to group membership.
d) A group created for users who need administrative privileges - Administrative privileges are typically granted through the sudo command or through membership in the "sudo" or "wheel" groups, not through a User Private Group.

3. Answer: b) A group created automatically when a new user account is created

4. Why is it important to plan how to use groups before creating user accounts in a Linux networked environment?

    a) To make the system more complex
    b) To reduce the number of groups needed
    c) To improve security and flexibility
    d) To improve system performance

/* --------------------- */

--------------------------

4 Answer Below: 

--------------------------

/* --------------------- */

Explanation: Planning how to use groups before creating user accounts allows for greater control over which users have access to which files and services.

4. Answer: c) To improve security and flexibility

Scenario:

You are a system operator and administrator of a Linux networked environment. You are tasked with creating user accounts for a new team of developers who will be working on a project. The team will be working on a project that requires access to certain files and services. You need to create the user accounts and assign group memberships to each team member.


1. Which of the following is an advantage of creating separate user accounts for each team member?

    a. It allows for multiple users to share the same home directory.
    b. It allows for greater management flexibility.
    c. It reduces the need for users to use the sudo command.
    d. It simplifies the process of assigning group memberships.

/* --------------------- */

--------------------------

1 Answer Below: 

--------------------------

/* --------------------- */

Explanation: Creating separate user accounts for each team member allows for greater management flexibility because each account can have group memberships and rights associated with it, which can be used to grant selective access to files or services. The user of each account also has a separate home directory that is generally not accessible to the other users. This makes it easier to manage user accounts and permissions.


Answer: b. It allows for greater management flexibility.

2. When creating a new user account, what is the default primary group for the user on distributions that do not create a User Private Group (UPG)?

    a. sudo
    b. users
    c. wheel
    d. admin

/* --------------------- */

--------------------------

2 Answer Below: 

--------------------------

/* --------------------- */

Explanation: On distributions that do not create a User Private Group (UPG), new users are typically given the users group as their primary group. The administrator can manually create group accounts that are private for the user, but it's more common for the administrator to create groups for multiple users that need to collaborate. User accounts can be modified at any time to add or remove them from group account memberships, but users must belong to at least one group for use as their primary group.


2. Answer: b. users

3. Which of the following should be done first when creating user accounts and assigning group memberships?

    a. Create the user accounts and then the groups.
    b. Create the groups and then the user accounts.
    c. Assign group memberships and then create the user accounts.
    d. Create the user accounts and assign group memberships at the same time.

/* --------------------- */

--------------------------

2 Answer Below: 

--------------------------

/* --------------------- */

Explanation: If you already have planned which users and groups you want, it is more efficient to create your groups first and create your users with their group memberships. Otherwise, if you create your users first, and then your groups, you'll need to take an extra step to modify your users to make them members of your groups.

Answer: b. Create the groups and then the user accounts.