Which of the following steps prevents a user from obtaining an interactive login session?
Answer(s): A
Running the command chsh -s /bin/false with the user name will change the user's login shell to /bin/false, which is a program that does nothing and returns a non-zero exit code. This means that the user will not be able to execute any commands or start an interactive shell session. This is a common way to disable a user's login without disabling the account completely, which can be useful for users who only need to access the system via scp, sftp, or other non-interactive services.However, this method does not prevent the user from authenticating with the system, and it may not work with some services that do not rely on the login shell, such as ssh with a forced command. Therefore, it is not a foolproof way to secure the system from unauthorized access.
1234
Which file specifies the user accounts that can NOT submit jobs via at or batch? (Provide the full path and filename)
The /etc/at.deny file specifies the user accounts that can NOT submit jobs via at or batch. The format of the file is a list of usernames, one on each line. Whitespace is not permitted. The superuser may always use at. If the file /etc/at.allow exists, only usernames mentioned in it are allowed to use at. If /etc/at.allow does not exist, /etc/at.deny is checked12. The at and batch commands use the files /usr/lib/cron/at.allow and /usr/lib/cron/at.deny to restrict usage on some systems3.
at.allow(5) - Linux man page at.deny(5) [linux man page] - The UNIX and Linux ForumsThe at.allow and at.deny files - IBM
Which character in the password field of /etc/passwd is used to indicate that the encrypted password is stored in /etc/shadow?
Answer(s): D
The password field of /etc/passwd is used to store the user's encrypted password or a special character that indicates how the password is stored. In older Linux systems, the user's encrypted password was stored in the /etc/passwd file. On most modern systems, this field is set to x, and the user password is stored in the /etc/shadow file12. The /etc/shadow file is more secure than the /etc/passwd file because it is readable only by the root user and not by regular users1. The other options are not valid characters for the password field of /etc/passwd.
Understanding the /etc/passwd File | LinuxizeUnderstanding the /etc/passwd File - GeeksforGeeks
The system's timezone may be set by linking /etc/localtime to an appropriate file in which directory? (Provide the full path to the directory, without any country information)
The /usr/share/zoneinfo directory contains the binary time zone files that are used by the system to determine the local time for any region. The files are organized in subdirectories by continent, country, or ocean. Some files represent the standard time zones, while others may have historical or political variations. To set the system's timezone, one can create a symbolic link from /etc/localtime to the appropriate file in the /usr/share/zoneinfo directory. For example, to set the timezone to America/New_York, one can use the command sudo ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime. Alternatively, one can use the timedatectl command to set the timezone without creating the link manually.
How to Set or Change the Time Zone in Linux | Linuxize4 Ways to Change the Timezone in Linux - wikiHow
Which of the following fields are available in both the global /etc/crontab file as well as in user- specific crontab files? (Select TWO correct answers)
Answer(s): B,D
The crontab file format consists of six fields: minute, hour, day of month, month, day of week, and command. The user-specific crontab files have the same format as the global /etc/crontab file, except that they do not have the username field. The username field is only present in the system-wide crontab files and specifies which user will run the cron job. The year field is not a valid crontab field and is not supported by cron.
Scheduling Cron Jobs with Crontab | LinuxizeCrontab Explained in Linux [With Examples]
Post your Comments and Discuss LPI 102-500 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the 102-500 content, but please register or login to continue.