linux用户组管理命令
This section contains Aptitude Questions and Answers on Linux User and Group Commands.
本节包含有关Linux用户和组命令的 Aptitude问答。
Correct answer: 3
useradd
The useradd command is used to create a new user in the Linux operating system.
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.
正确答案:3
以上两者
当我们创建新用户时,将创建具有所需所有权和权限的新主目录。
/etc/group
/etc/shadow
/etc/gshadow
/etc/passwd
Options:
Correct answer: 4
A, B, C, and D
All given files get edited when we create a new in Linux operating system.
/ etc / group
/ etc / shadow
/ etc / gshadow
/ etc / passwd
选项:
正确答案:4
A,B,C和D
当我们在Linux操作系统中创建新文件时,所有给定的文件都会被编辑。
Correct answer: 1
0
The 0 UID is reserved for root users in Linux operating system.
Correct answer: 3
100-999
The UIDs range 100-999 and are reserved for groups and system accounts.
正确答案:3
100-999
UID的范围为100-999,并且保留给组和系统帐户使用。
GID is a group identification number that is used it identify a group in Linux OS.
GID is provided by the Linux operating system to the newly created group.
GID is provided by the user who created the group in the Linux operating system.
GIDs are stored in /etc/group file.
Options:
Correct answer: 2
A, B, and D
Statements A, B, and D are correct about GID in the Linux operating system.
GID是一个组标识号,用于在Linux OS中标识一个组。
GID由Linux操作系统提供给新创建的组。
GID由在Linux操作系统中创建组的用户提供。
GID存储在/ etc / group文件中。
选项:
正确答案:2
A,B和D
关于Linux操作系统中GID的语句A,B和D是正确的。
Correct answer: 2
useradd -m -d /MyHome user1
The 2nd option is an exact command to create a user user1 with home directory MyHome.
正确答案:2
useradd -m -d / MyHome user1
第二个选项是使用主目录MyHome创建用户user1的精确命令。
Correct answer: 3
passwd
The passwd command is used to assign a password to the created user.
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.
who
whoami
who am i
w
Options:
Correct answer: 4
A, B, C, and D
All given commands are used to know about the current user.
This command describes the user id.
This command describes the group id.
This command describes the list of groups belongs to the user.
All the above
Options:
Correct answer: 4
D
All statements are correct about the id command.
此命令描述用户标识。
此命令描述组ID。
此命令描述属于用户的组列表。
以上全部
选项:
正确答案:4
d
所有关于id命令的语句都是正确的。
Correct answer: 2
Using su command
Using su command is used to change a normal user to root user.
正确答案:2
使用su命令
使用su命令可将普通用户更改为root用户。
Correct answer: 1
Yes
Yes we can create a new user without becoming root user using the sudo command.
Correct answer: 2
/etc/shadow
The /etc/shadow file contains encrypted user's passwords.
正确答案:2
/ etc / shadow
/ etc / shadow文件包含加密的用户密码。
Correct answer: 2
No
No, a non-root user cannot read /etc/shadow file.
Correct answer: 3
openssl passwd
The openssl password command is used to create an encrypted password.
In this file, we can define the maximum number of days a password may be used.
In this file, we can define the minimum number of days allowed between password changes.
In this file, we can also define the minimum and maximum length of the password.
There is no "/etc/login.defs" file exists in the Linux operating system.
Options:
Correct answer: 3
A, B and C
Statements A, B, and C are correct about /etc/login.defs file.
在此文件中,我们可以定义密码可以使用的最大天数。
在此文件中,我们可以定义两次密码更改之间允许的最少天数。
在此文件中,我们还可以定义密码的最小和最大长度。
Linux操作系统中不存在“ /etc/login.defs”文件。
选项:
正确答案:3
A,B和C
关于/etc/login.defs文件,语句A,B和C是正确的。
Correct answer: 1
change
The change command is used to know password information.
Correct answer: 1
usermod
The usermod command is used to enable and disable password for a particular user.
Correct answer: 4
usermod -L <user name>
The 4th option is correct command to disable password for a particular user.
正确答案:4
usermod -L <用户名>
第四个选项是正确的命令,用于禁用特定用户的密码。
Correct answer: 3
groupadd
The groupadd command is used to create a new group.
Correct answer: 2
groups
The groups command is used to know about groups that below to current user.
Correct answer: 4
groupmod
The groupmod command is used to rename the existing group.
Correct answer: 3
groupdel
The groupdel command is used to remove an existing group.
Correct answer: 2
gpasswd
The gpasswd command is used to pass control of group membership to another user.
正确答案:2
gpasswd
gpasswd命令用于将组成员身份控制权传递给另一个用户。
linux用户组管理命令