0% found this document useful (0 votes)
132 views5 pages

Chapter-5 (Users and Groups Management)

The document contains questions and answers about Linux user accounts and permissions. It covers topics such as privileged users, the sudo command, password storage, user configuration files, adding users to groups, and managing user accounts.

Uploaded by

Kyar Nyo Aye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views5 pages

Chapter-5 (Users and Groups Management)

The document contains questions and answers about Linux user accounts and permissions. It covers topics such as privileged users, the sudo command, password storage, user configuration files, adding users to groups, and managing user accounts.

Uploaded by

Kyar Nyo Aye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

Which statement about privileged users (root) is true?

A. A privileged user is a user who has access to a Linux system.


B. A privileged user with no access permissions can do nothing at all.
C. Privileged users are not restricted in any way.
D. On every server, at least one privileged user must be manually created while
installing the server.
ANSWER: C

On a default installation of a RHEL 7 server, which group does the user typically
need to be a member of to be able to use sudo to run all administration commands?
A. admin
B. root
C. sys
D. wheel
ANSWER: D

Which of the following is used to store the hash of the user’s encrypted password?
A. /etc/passwd
B. /etc/shadow
C. /etc/users
D. /etc/secure
ANSWER: B

Which configuration file should you change to set the default location for all new
user home directories?
A. /etc/login.defaults
B. /etc/login.defs
C. /etc/default/useradd
D. /etc/default/login.defs
ANSWER: C

Which field contains the same data for both a /etc/passwd and /etc/shadow file
record?
A. Password
B. Account expiration date
C. UID
D. GID
E. User account’s username
ANSWER: E

Which command enables you to get information about password properties such as
password expiry?
A. chage -l
B. usermod --show
C. passwd -l
D. chage --show
ANSWER: A

Which of the following files is not processed when a user starts a login shell?
A. /etc/profile
B. /etc/.profile
C. ~/.bashrc
D. ~/.bash_profile
ANSWER: B

You create an account using the useradd utility, except for some reason the
account’s home directory was not created. Which of the following most likely caused
this to occur?
A. The HOME directive is set to no.
B. You did not employ super user privileges.
C. The CREATE_HOME directive is not set.
D. The INACTIVE directive is set to -1.
E. The EXPIRE date is set and it is before today.
ANSWER: C

Which of the following commands is the best one to add Alice as a member to a new
group called the Consultant group and not remove any of the account’s previous
group memberships?
A. usermod -g Consultant Alice
B. usermod -G Consultant Alice
C. usermod -aG Consultant Alice
D. groupadd Consultant
E. groupmod Consultant Alice
ANSWER: C

Where are the user shells assigned?


A. /etc/skel
B. /etc/passwd
C. /etc/profile
D. none of the above
ANSWER: B

Which command and options are used to delete a user’s account and home directory?
A. userdel -r
B. usermod -f
C. passwd -e
D. usermod -e
ANSWER: A

Which environment variable would be used to specify the location of files that you
wish to run without specifying an absolute path?
A. HOME
B. PS1
C. PATH
D. TERM
ANSWER: C

User id 0 is
A. an invalid user id
B. the id of the root user
C. the id of a user when the user’s account is deleted
D. none of the above
ANSWER: B

The login shell is


A. the shell program that runs when the user logs in
B. the shell program that authenticates the user while logging in
C. common shell for all the users that belong to the same group
D. none of the above
ANSWER: A

What is the command to determine when a user needs to change the password?
A. chage -E
B. chage -l
C. chage -m
D. chage -W
ANSWER: B
Which command changes Alice's home directory from its default location to
/usr/local directory?
A. usermod -d /usr/local Alice
B. usermod -g /usr/local Alice
C. usermod -l /usr/local Alice
D. usermod -a /usr/local Alice
ANSWER: A

Which command removes the admin group from the system?


A. groupdel -n admin
B. groupdel -o -g admin
C. groupmod -o delete admin
D. groupdel admin
ANSWER: D

Which command do you use to create a new password for user "Alice"?
A. passwd Alice
B. password Alice
C. pswd Alice
D. passwd -x Alice
ANSWER: A

What does usermod -l Alice Julia command do?


A. Add Alice to the system
B. Change the login name of Alice to Julia
C. Delete Alice's account and replace with Julia account
D. Move the files in Julia's home directory to Alice's home directory
ANSWER: B

In which file or directory are user's folders created by default?


A. /etc/passwd
B. /etc/group
C. /home
D. /etc/skel
ANSWER: C

You have created new shell scripts and placed these scripts in the /usr/local/bin
directory. You want to now add this directory to the system path. Which command do
you use to do this?
A. HOME=/usr/local/bin
B. PATH=$PATH:/usr/local/bin
C. SHELL=$SHELL:/usr/local/bin
D. ENV=$ENV:/usr/local/bin
ANSWER: B

Which command enables you to change the password to the finance group?
A. gpasswd -a finance
B. gpasswd -d finance
C. gpasswd -r finance
D. gpasswd finance
ANSWER: D

Which configuration file contains the default values of environment variables for
the Bourne Again shell (bash)?
A. ~/.bash_logout
B. ~/.bash_profile
C. /etc/bashrc
D. /etc/profile
ANSWER: D
Suppose you want to change the name of the group from "oldgroup" to "newgroup".
Which command would you use?
A. groupmod -n -g oldgroup newgroup
B. groupmod -n -o oldgroup newgroup
C. groupmod -n oldgroup newgroup
D. groupmod -n newgroup oldgroup
ANSWER: D

Which file stores user-specific values of environment variables for the Bourne
Again shell (bash)?
A. .bash_logout
B. .bash_profile
C. .bashrc
D. .bash_history
ANSWER: B

When a user initiates bash shell, which user specific configuration file does the
system read first?
A. ~/.bash_logout
B. ~/.bash_profile
C. ~/.bashrc
D. /etc/profile
ANSWER: B

Why can only one group be active for a user at one time?
A. A user cannot switch between groups
B. Groups determine user's file permissions
C. Linux supports limited number of groups
D. User can be active for multiple groups at single time
ANSWER: B

Which command is used to login and logout from any account on the terminal?
A. su
B. sudo
C. log_out
D. logme
ANSWER: A

The /etc/passwd file doesn’t contain


A. userid
B. home directory for a user
C. login shell name
D. none of the above
ANSWER: D

Which of the following files need to be referred for user’s secondary group?
A. /etc/passwd
B. /etc/shadow
C. /etc/group
D. /etc/profile
ANSWER: C

What can you do to ensure that no users, except for the user root, can log in
temporarily?
A. Set the default shell to /usr/sbin/nologin
B. Set the default shell to /bin/false
C. Create a file with the name /etc/nologin
D. Create a file with the name /etc/nologin.txt
ANSWER: D

You might also like