A systems administrator is connected to a Linux server using a standard, non-root user account. The administrator needs to edit the /etc/ntp.conf file to update the server's time sources but receives a "Permission denied" error when attempting to save the file. Which of the following commands should the administrator use to edit the file while adhering to the principle of least privilege?
The correct command is sudo vi /etc/ntp.conf. The sudo (superuser do) command is the standard and most secure method for executing a single command with elevated (root) privileges on a Linux system. It grants the necessary permissions for just that one command, adhering to the principle of least privilege. The su command would switch the user's entire shell to the root user, which provides more privilege than necessary for this single task. The runas command is a tool used on Windows operating systems to run a program as another user and is not applicable in a Linux environment. The chmod 777 /etc/ntp.conf command is a significant security risk; it would make the configuration file readable, writable, and executable by all users on the system, which is an insecure and improper way to manage system file permissions.