010-160 practice question 15 of 15
What is true about the su command?
Full set: 81 questionsThe su (substitute user) command is a standard Unix/Linux utility used to switch to another user account. Its primary purpose is to execute commands with the privileges of that other user. When invoked without a username, it defaults to the superuser, root. It can be used to start an interactive shell (e.g., su - anotheruser) or to run a single command with the target user's identity (e.g., su -c 'command' anotheruser). This allows for privilege escalation or impersonation for administrative tasks without requiring a full login session.
A. The default shell for the root account is an executable program (like /bin/bash) specified in the /etc/passwd file, not the su command itself.
B. Any user can use the su command to attempt to switch to another user, provided they can authenticate with the target user's password.
D. The usermod command is used to modify user account attributes, including changing the account name (usermod -l newname oldname).
E. Account locking is managed through utilities like passwd -l or usermod -L, or by configuring Pluggable Authentication Modules (PAM), not by su. ---
1. Linux man-pages project, su(1):
Reference: In the NAME section, it is defined as "su - run a command with substitute user and group ID". The DESCRIPTION section further clarifies, "The su command is used to become another user during a login session."
Source: man su(1), util-linux package documentation. Available via man su on most Linux systems or online at man7.org.
2. Red Hat Enterprise Linux 8 Documentation, "Configuring basic system settings":
Reference: Chapter 26, Section 26.8, "Switching users". The documentation states, "To switch to another user account in the command line, for example root, use the su command... You can run a command as another user without interactively switching to that account. To do so, use the su -c command".
Source: Red Hat Customer Portal, RHEL 8 Documentation.
3. University of California, Berkeley, EECS Courseware (CS 161: Computer Security):
Reference: Lecture notes on "Unix Security & Permissions" often describe the principle of least privilege and the tools to manage it. The su command is presented as the traditional method to temporarily gain superuser privileges to perform a specific task. For example, "The su command ('substitute user') allows you to run a shell as another user."
Source: Course materials for CS 161, often available publicly on the university's EECS department website.
Keep practicing
Take the free 010-160 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 010-160 practice questions
- Question 1What can be found in the /proc/ directory?
- Question 2Which permissions are set on a regular file once the permissions have been modified with …
- Question 3Which of the following commands puts the lines of the file data.csv into alphabetical ord…
- Question 4Which of the following programs are web servers? (Choose two.)
- Question 5The file script.sh in the current directory contains the following content: #!/bin/bash e…
- Question 6Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.1…
