Linux 1
Linux 1
Linux 1
3. Which command will display the UID, GID and groups your current
user belongs to?
whoami
Who
id
about
5. Which command will display the users that are currently logged in to
the system?
about
who
id
whoami
8. Which of the following commands will display the groups that the
user bob belongs to?
group bob
id bob
groups -a
all bob
12. Sudo privileges can be used to specify which user can use
the sudo command to execute commands as other users.
True or False?
True
False
13. In distributions that do not allow the root user to login directly
or via the su command, the installation process automatically
configures one user account to be able to use the sudo command to
execute commands as if they were executed by the root user.
True or False?
True
False
14. Which of the following commands will display how long the
system has been running since the last boot?
(choose two)
who
id
uptime
w
23. What would an account with the UID 376 typically be used for?
White hat hackers.
Temporary employees.
New users with full privileges.
System service access.
Root user access.
26. Which command will display the groups that the root user
belongs to?
all -t
groups -a
id root
all
group -r
32. The first line of this command displays how long the system
has been running since being rebooted.
su
getent
w
id
who
2. If a user is deleted, the files and directories that the user owned…
…will have no user owner.
…will have no UID owner.
…will show a UID as the owner, but not user name.
…are deleted as well.
3. Which of the following options for the useradd command allows root
to specify the UID to be associated with the account?
-g
-G
-u
-M
4. Which of the following options for the useradd command allows root
to specify supplementary groups the user will be a member of?
-G
-u
-g
-U
5. On a system that does not use UPG, the useradd command will also
create a user group. For example, user bob, group bob.
True or False?
True
False
6. Which of the following commands will add the group extra to the
user bob‘s secondary groups in addition to bob‘s current secondary
groups?
usermod -G extra bob
usermod -ag bob extra
usermod -aG extra bob
usermod -a extra bob
7. Which option for the usermod command can be used to specify a
user’s group ID (either primary or secondary)?
(choose two)
-s
-g
-S
-G
8. For non-root users, the passwd command can only be used to change
the password of the user running the command.
True or False?
True
False
16. Which of the following files does the groupadd command use to
determine the new GID when a GID isn’t specified?
/etc/usr
/etc/shadow
/etc/passwd
/etc/group
17. Which of the following commands, run as root, will prevent the
user bob from logging in?
usermod -L bob
usermod -l bob
usermod -D bob
usermod -d bob
19. GIDs under 500 (or 1000) are usually reserved for what kind of
groups?
System use
Are not used for groups, but for user accounts
Administrators
User private groups (UPG)
20. If a user is deleted, the files and directories that the user
owned…
…are deleted as well.
…will have no user owner.
…may be important for others in the organization
…will have no UID owner.
21. Which of the following options for the useradd command allows
you to use a different primary group then the default?
-g
-G
-U
-u
22. On a system that uses UPG, the UID must not be the same as
the GID..
True or False?
True
False
24. Which of the following options for the useradd command allows
you to use a different login shell than the default?
-g
-s
-u
-U
25. Which of the following commands will add the group extra to
the user jane’s secondary groups in addition to jane‘s current
secondary groups?
usermod -a extra jane
usermod -ag jane extra
usermod -aG extra jane
usermod -G extra jane
26. Which option for the usermod command can be used to specify a
user’s primary group ID?
-g
-S
-G
-s
27. For root users, the passwd command can only be used to change
the password of the user running the command.
True or False?
True
False
37. Which of the following commands, run as root, will prevent the
user jane from logging in?
usermod -d jane
usermod -D jane
usermod -L jane
usermod -l jane