Linux User and Group Commands Aptitude Questions and Answers

Linux User and Group Commands Aptitude Questions and Answers: This section contains aptitude questions and answers on Linux User and Group Commands.
Submitted by Nidhi, on May 20, 2020

This section contains Aptitude Questions and Answers on Linux User and Group Commands.

1) Which of the following commands is used to create a new user in the Linux operating system?
  1. createuser
  2. adduser
  3. useradd
  4. user

2) What operations are performed when a new user is created?
  1. Creates a new home directory for the user
  2. The ownership and permissions are assigned to the home directory
  3. Both of the above
  4. None of the above

3) Which of the files gets edited when we create a new in Linux operating system?
  1. /etc/group
  2. /etc/shadow
  3. /etc/gshadow
  4. /etc/passwd

Options:

  1. A and B
  2. C and D
  3. A, B, and C
  4. A, B, C, and D

4) What is the default UID of root user in the Linux operating system?
  1. 0
  2. 1
  3. 2
  4. 3

5) What is the range of UIDs is reserved for groups and system accounts?
  1. 1-50
  2. 51-100
  3. 100-999
  4. 1000-9999

6) There are the following statements that are given below, which of them are correct about GID in the Linux operating system?
  1. GID is a group identification number that is used it identify a group in Linux OS.
  2. GID is provided by the Linux operating system to the newly created group.
  3. GID is provided by the user who created the group in the Linux operating system.
  4. GIDs are stored in /etc/group file.

Options:

  1. A and B
  2. A, B, and D
  3. A, B, and C
  4. B, C, and D

7) Which exact command is used to create a user with a specified name for the home directory, here we will create a user with user1 name and name of the home directory will be MyHome?
  1. useradd -m /MyHome user1
  2. useradd -m -d /MyHome user1
  3. useradd -m -h /MyHome user1
  4. useraddhome /MyHome user1

8) Which Linux command is used to assign a password to the created user?
  1. password
  2. newpass
  3. passwd
  4. pwd

9) Can we create a new user with an expiry date?
  1. Yes
  2. No

10) Which of the following commands are used to know about the current user?
  1. who
  2. whoami
  3. who am i
  4. w

Options:

  1. A and B
  2. C and D
  3. A, B, and C
  4. A, B, C, and D

11) There are the following statements that are given below, which of them are correct about the "id" command in the Linux operating system?
  1. This command describes the user id.
  2. This command describes the group id.
  3. This command describes the list of groups belongs to the user.
  4. All the above

Options:

  1. A and B
  2. A and C
  3. B and C
  4. D

12) How to change the normal user to root user using the terminal in the Linux operating system?
  1. Using sudo command
  2. Using su command
  3. Using super command
  4. None of the above

13) Can we create a new user without becoming a root user?
  1. Yes
  2. No

14) Which file contains encrypted user's passwords?
  1. /etc/passwords
  2. /etc/shadow
  3. /etc/pwd
  4. /etc/pwds

15) Can a non-root user read /etc/shadow file?
  1. Yes
  2. No

16) Which Linux command is used to create an encrypted password?
  1. encrypt passwd
  2. secure passwd
  3. openssl passwd
  4. All the above

17) There are the following statements that are given below, which of them are correct about "/etc/login.defs" file in the Linux operating system?
  1. In this file, we can define the maximum number of days a password may be used.
  2. In this file, we can define the minimum number of days allowed between password changes.
  3. In this file, we can also define the minimum and maximum length of the password.
  4. There is no "/etc/login.defs" file exists in the Linux operating system.

Options:

  1. A and B
  2. A and C
  3. A, B and C
  4. D

18) Which command is used to know information about a password?
  1. change
  2. knowpass
  3. passinf
  4. info

19) Which command is used to enable/disable password for a particular user?
  1. usermod
  2. userenable
  3. userdisable
  4. change

20) Which exact command is used to disable password for a particular user?
  1. usermod -D <user name>
  2. usermod -d <user name>
  3. usermod -l <user name>
  4. usermod -L <user name>

21) Which command is used to create a new group in the Linux operating system?
  1. creategroup
  2. addgroup
  3. groupadd
  4. groupcreate

22) Which command is used to know about groups that belong to the current user?
  1. grouplist
  2. groups
  3. groupinfo
  4. groupinformation

23) Which command is used to rename the existing group?
  1. rename
  2. rengroup
  3. groupmode
  4. groupmod

24) Which command is used to remove an existing group?
  1. removegroup
  2. deletegroup
  3. groupdel
  4. grouprmv

25) Which command is used to pass control of group membership to another user?
  1. groupuser
  2. gpasswd
  3. grouppasswd
  4. None of the above





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.