What is NOT contained in the locale setting of the operating system?
Answer(s): C
The locale setting of the operating system is a set of environmental variables that defines the language, country, and character encoding settings (or any other special variant preferences) for the applications and shell session on a Linux system12. The locale setting usually consists of at least a language code and a country/region code, such as en_US for English (United States) or fr_FR for French (France). The locale setting also affects things such as the currency symbol, the thousands separator, the decimal point, the date and time format, the collation order, the paper size, the telephone number format, and many other values formatted in accordance with the language or region/country12. However, the timezone is not contained in the locale setting of the operating system. The timezone is a separate setting that determines the local time of the system based on the offset from the Coordinated Universal Time (UTC) and the daylight saving time (DST) rules. The timezone can be different from the country/region code in the locale setting, for example, a user can have a locale setting of en_US but a timezone of Asia/Kolkata. The timezone can be viewed and modified by using the date, timedatectl, or tzselect commands .
12
What is true about the file /etc/localtime?
Answer(s): E
The /etc/localtime file is used to configure the system-wide timezone of the local system that is used by applications for presentation to the user. It should be either a symlink to or a copy of a timezone information file that contains the binary data for the configured timezone. The timezone information files are located under /usr/share/zoneinfo/ and are named after the geographic regions and cities, such as Europe/Berlin or Etc/UTC. The timezone identifier is extracted from the symlink target name of /etc/localtime, so it is recommended to use a symlink rather than a copy. The timezone can be changed by using the timedatectl command or by creating a new symlink to the desired timezone file123.
How to Set or Change the Time Zone in Linux | Linuxize localtime(5) - Linux manual page - man7.org localtime(5) -- Arch manual pages
What is true regarding the command userdel --force --remove bob? (Choose TWO correct answers.)
Answer(s): A,B
The command userdel --force --remove bob is used to delete the user account named bob and all its associated files. The --force option forces the removal of the user account, even if the user is still logged in. The --remove option forces userdel to remove the user's home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user12. Therefore, options A and B are true regarding this command.The other options are not true because:Option C is false because the locate database is not updated by the userdel command. The locate database is updated by the updatedb command, which is usually run by cron as a scheduled job3. Option D is false because the userdel command does not remove all files owned by bob from all mounted filesystems. The userdel command only removes the user's home directory and mail spool, and it does not search for and delete the user files located in other file systems. You have to search for and delete the files manually1.Option E is false because the userdel command does not delete the group with the same name as the user, unless the USERGROUPS_ENAB parameter is set to yes in the /etc/login.defs file and the group has no other members14.
How to Delete/Remove Users in Linux (userdel Command) | Linuxize userdel(8) -- Linux manual page updatedb(8) -- Linux manual pageUnderstanding the /etc/login.defs File | Linuxize
Which of the following fields can be found in the /etc/group file? (Choose THREE correct answers.)
Answer(s): A,C,E
The /etc/group file is a text file that defines the groups and their members on the system. Each line in the file represents a single group, with the following format:group_name:password:GID:user_listThe fields are:group_name: the name of the group password: the (encrypted) group password, or empty for no password GID: the numerical group IDuser_list: a comma-separated list of users who belong to the group Therefore, the fields that can be found in the /etc/group file are the name of the group, the password of the group, and the list of users that belong to the group. The home directory and the description of the group are not part of the /etc/group file format.
group(5) - Linux manual page/etc/group file format | Linux#
On a system using shadowed passwords, the most correct permissions for /etc/passwd are ___ and the most correct permissions for /etc/shadow are _________.
The /etc/passwd file stores local accounts of the system. It is a readable text file and uses colons (:) to separate the fields. This file helps with converting user IDs to names (and back). It is fine that all users can read this file, but they should not be able to change fields. Therefore, the most correct permissions for /etc/passwd are -rw-rr, which means that only the owner (root) can write to the file, and everyone can read it. The /etc/shadow file contains information about the system's users' passwords. It is owned by user root and group shadow, and has 640 permissions. The password is stored as a long string of characters, which is a combination of the hashing algorithm, optional salt applied, and the hashed password itself. Other users are not allowed to read the file directly, to prevent them from gathering hashed passwords of others. Therefore, the most correct permissions for /etc/shadow are -r--------, which means that only the owner (root) can read the file, and no one else can read or write to it.
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.