linux用户组管理命令_Linux用户和组命令能力问题和解答

linux用户组管理命令

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

本节包含有关Linux用户和组命令的 Aptitude问答。

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

Answer & Explanation

Correct answer: 3
useradd

The useradd command is used to create a new user in the Linux operating system.

1)以下哪个命令用于在Linux操作系统中创建新用户?
  1. 创建用户

  2. 添加用户

  3. 用户添加

  4. 用户

答案与解释

正确答案:3
用户添加

useradd命令用于在Linux操作系统中创建新用户。

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

Answer & Explanation

Correct answer: 3
Both of the above

When we create a new user then a new home directory gets created with required ownership and permissions.

2)创建新用户时执行什么操作?
  1. 为用户创建一个新的主目录

  2. 所有权和权限分配给主目录

  3. 以上两者

  4. 以上都不是

答案与解释

正确答案:3
以上两者

当我们创建新用户时,将创建具有所需所有权和权限的新主目录。

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

Answer & Explanation

Correct answer: 4
A, B, C, and D

All given files get edited when we create a new in Linux operating system.

3)当我们在Linux操作系统中创建新文件时,哪个文件会被编辑?
  1. / etc / group

  2. / etc / shadow

  3. / etc / gshadow

  4. / etc / passwd

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和D

当我们在Linux操作系统中创建新文件时,所有给定的文件都会被编辑。

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

  2. 1

  3. 2

  4. 3

Answer & Explanation

Correct answer: 1
0

The 0 UID is reserved for root users in Linux operating system.

4)Linux操作系统中root用户的默认UID是什么?
  1. 0

  2. 1个

  3. 2

  4. 3

答案与解释

正确答案:1
0

0 UID为Linux操作系统中的root用户保留。

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

Answer & Explanation

Correct answer: 3
100-999

The UIDs range 100-999 and are reserved for groups and system accounts.

5)为组和系统帐户保留的UID范围是多少?
  1. 1-50

  2. 51-100

  3. 100-999

  4. 1000-9999

答案与解释

正确答案:3
100-999

UID的范围为100-999,并且保留给组和系统帐户使用。

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

Answer & Explanation

Correct answer: 2
A, B, and D

Statements A, B, and D are correct about GID in the Linux operating system.

6)下面给出了以下语句,其中哪些对于Linux操作系统中的GID是正确的?
  1. GID是一个组标识号,用于在Linux OS中标识一个组。

  2. GID由Linux操作系统提供给新创建的组。

  3. GID由在Linux操作系统中创建组的用户提供。

  4. GID存储在/ etc / group文件中。

选项:

  1. A和B

  2. A,B和D

  3. A,B和C

  4. B,C和D

答案与解释

正确答案:2
A,B和D

关于Linux操作系统中GID的语句A,B和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

Answer & Explanation

Correct answer: 2
useradd -m -d /MyHome user1

The 2nd option is an exact command to create a user user1 with home directory MyHome.

7)使用哪个确切的命令创建一个具有主目录指定名称的用户,这里我们将创建一个具有user1名称的用户,并且主目录的名称将为MyHome?
  1. useradd -m / MyHome user1

  2. useradd -m -d / MyHome user1

  3. useradd -m -h / MyHome user1

  4. useraddhome / MyHome user1

答案与解释

正确答案:2
useradd -m -d / MyHome user1

第二个选项是使用主目录MyHome创建用户user1的精确命令。

8) Which Linux command is used to assign a password to the created user?
  1. password

  2. newpass

  3. passwd

  4. pwd

Answer & Explanation

Correct answer: 3
passwd

The passwd command is used to assign a password to the created user.

8)使用哪个Linux命令向创建的用户分配密码?
  1. 密码

  2. 新通

  3. 密码

  4. 密码

答案与解释

正确答案:3
密码

passwd命令用于为创建的用户分配密码。

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

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, we can create a new user with an expiry date; it means the user gets deleted automatically after a particular date.

9)我们可以创建一个具有到期日期的新用户吗?
  1. 没有

答案与解释

正确答案:1

是的,我们可以创建一个具有到期日期的新用户; 这意味着用户将在特定日期后自动删除。

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

Answer & Explanation

Correct answer: 4
A, B, C, and D

All given commands are used to know about the current user.

10)以下哪个命令用于了解当前用户?
  1. WHO

  2. 我是谁

  3. 我是谁

  4. w

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和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

Answer & Explanation

Correct answer: 4
D

All statements are correct about the id command.

11)下面给出了以下语句,其中哪些对于Linux操作系统中的“ id”命令是正确的?
  1. 此命令描述用户标识。

  2. 此命令描述组ID。

  3. 此命令描述属于用户的组列表。

  4. 以上全部

选项:

  1. A和B

  2. A和C

  3. B和C

  4. d

答案与解释

正确答案:4
d

所有关于id命令的语句都是正确的。

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

Answer & Explanation

Correct answer: 2
Using su command

Using su command is used to change a normal user to root user.

12)如何在Linux操作系统中使用终端将普通用户更改为root用户?
  1. 使用sudo命令

  2. 使用su命令

  3. 使用超级命令

  4. 以上都不是

答案与解释

正确答案:2
使用su命令

使用su命令可将普通用户更改为root用户。

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

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes we can create a new user without becoming root user using the sudo command.

13)我们可以创建新用户而不成为root用户吗?
  1. 没有

答案与解释

正确答案:1

是的,我们可以使用sudo命令创建新用户而无需成为root用户。

14) Which file contains encrypted user's passwords?
  1. /etc/passwords

  2. /etc/shadow

  3. /etc/pwd

  4. /etc/pwds

Answer & Explanation

Correct answer: 2
/etc/shadow

The /etc/shadow file contains encrypted user's passwords.

14)哪个文件包含加密的用户密码?
  1. / etc / passwords

  2. / etc / shadow

  3. / etc / pwd

  4. / etc / pwds

答案与解释

正确答案:2
/ etc / shadow

/ etc / shadow文件包含加密的用户密码。

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

  2. No

Answer & Explanation

Correct answer: 2
No

No, a non-root user cannot read /etc/shadow file.

15)非root用户可以读取/ etc / shadow文件吗?
  1. 没有

答案与解释

正确答案:2
没有

否,非root用户无法读取/ etc / shadow文件。

16) Which Linux command is used to create an encrypted password?
  1. encrypt passwd

  2. secure passwd

  3. openssl passwd

  4. All the above

Answer & Explanation

Correct answer: 3
openssl passwd

The openssl password command is used to create an encrypted password.

16)使用哪个Linux命令创建加密密码?
  1. 加密密码

  2. 安全密码

  3. openssl密码

  4. 以上全部

答案与解释

正确答案:3
openssl密码

openssl password命令用于创建加密密码。

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

Answer & Explanation

Correct answer: 3
A, B and C

Statements A, B, and C are correct about /etc/login.defs file.

17)下面给出了以下语句,其中哪些对于Linux操作系统中的“ /etc/login.defs”文件是正确的?
  1. 在此文件中,我们可以定义密码可以使用的最大天数。

  2. 在此文件中,我们可以定义两次密码更改之间允许的最少天数。

  3. 在此文件中,我们还可以定义密码的最小和最大长度。

  4. Linux操作系统中不存在“ /etc/login.defs”文件。

选项:

  1. A和B

  2. A和C

  3. A,B和C

  4. d

答案与解释

正确答案:3
A,B和C

关于/etc/login.defs文件,语句A,B和C是正确的。

18) Which command is used to know information about a password?
  1. change

  2. knowpass

  3. passinf

  4. info

Answer & Explanation

Correct answer: 1
change

The change command is used to know password information.

18)使用哪个命令来了解有关密码的信息?
  1. 更改

  2. 知识通

  3. 密码

  4. 信息

答案与解释

正确答案:1
更改

change命令用于了解密码信息。

19) Which command is used to enable/disable password for a particular user?
  1. usermod

  2. userenable

  3. userdisable

  4. change

Answer & Explanation

Correct answer: 1
usermod

The usermod command is used to enable and disable password for a particular user.

19)哪个命令用于启用/禁用特定用户的密码?
  1. 用户模组

  2. 用户可使用的

  3. 用户禁用

  4. 更改

答案与解释

正确答案:1
用户模组

usermod命令用于为特定用户启用和禁用密码。

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>

Answer & Explanation

Correct answer: 4
usermod -L <user name>

The 4th option is correct command to disable password for a particular user.

20)使用哪个确切命令来禁用特定用户的密码?
  1. usermod -D <用户名>

  2. usermod -d <用户名>

  3. usermod -l <​​用户名>

  4. usermod -L <用户名>

答案与解释

正确答案:4
usermod -L <用户名>

第四个选项是正确的命令,用于禁用特定用户的密码。

21) Which command is used to create a new group in the Linux operating system?
  1. creategroup

  2. addgroup

  3. groupadd

  4. groupcreate

Answer & Explanation

Correct answer: 3
groupadd

The groupadd command is used to create a new group.

21)在Linux操作系统中使用哪个命令创建新组?
  1. 创建组

  2. 添加组

  3. 组添加

  4. 组创建

答案与解释

正确答案:3
组添加

groupadd命令用于创建新组。

22) Which command is used to know about groups that belong to the current user?
  1. grouplist

  2. groups

  3. groupinfo

  4. groupinformation

Answer & Explanation

Correct answer: 2
groups

The groups command is used to know about groups that below to current user.

22)使用哪个命令了解属于当前用户的组?
  1. 群组清单

  2. 团体

  3. 组信息

  4. 组信息

答案与解释

正确答案:2
团体

groups命令用于了解当前用户下面的组。

23) Which command is used to rename the existing group?
  1. rename

  2. rengroup

  3. groupmode

  4. groupmod

Answer & Explanation

Correct answer: 4
groupmod

The groupmod command is used to rename the existing group.

23)使用哪个命令来重命名现有组?
  1. 改名

  2. 人组

  3. 组模式

  4. 组mod

答案与解释

正确答案:4
组mod

groupmod命令用于重命名现有组。

24) Which command is used to remove an existing group?
  1. removegroup

  2. deletegroup

  3. groupdel

  4. grouprmv

Answer & Explanation

Correct answer: 3
groupdel

The groupdel command is used to remove an existing group.

24)使用哪个命令删除现有组?
  1. 删除组

  2. 删除组

  3. groupdel

答案与解释

正确答案:3
groupdel

groupdel命令用于删除现有组。

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

Answer & Explanation

Correct answer: 2
gpasswd

The gpasswd command is used to pass control of group membership to another user.

25)使用哪个命令将组成员身份控制权传递给另一个用户?
  1. 组用户

  2. gpasswd

  3. 组密码

  4. 以上都不是

答案与解释

正确答案:2
gpasswd

gpasswd命令用于将组成员身份控制权传递给另一个用户。

翻译自: https://www.includehelp.com/linux/user-and-group-commands-commands-aptitude-questions-and-answers.aspx

linux用户组管理命令

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值