On a Debian system you drop an executable script named backup.sh into /etc/cron.daily/. Days pass and it never runs, although other scripts in the same directory clearly do. What is the most likely reason?
LPIC-1 Exam 102-500, objective 107. Administrative tasks medium
Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.
Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.
How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.
The options
Correct run-parts skips the file because its name contains a dot
Correct. Debian executes /etc/cron.daily/ through run-parts, which by default only considers names made up of ASCII letters, digits, underscores and hyphens. A name ending in .sh is silently ignored; renaming the script to backup fixes it.
Not correct Scripts in /etc/cron.daily/ must carry a five-field time specification on their first line
Wrong. Files under /etc/cron.daily/ are ordinary executables, not crontab files. The time specification lives once in /etc/crontab or in the systemd unit that drives the directory, not in each script.
Not correct The file must be owned by the user who wrote it rather than by root
Wrong. run-parts does not check ownership; it checks that the entry is executable and that the name is acceptable. Root ownership is normal for these directories.
Not correct /etc/cron.daily/ only accepts symbolic links, not regular files
Wrong. Regular files are the usual case. Symbolic links work too, but nothing requires them.
Why
The /etc/cron.{hourly,daily,weekly,monthly} directories are not parsed as crontabs: a single entry runs run-parts over the whole directory, and run-parts decides which entries are eligible. Debian's default naming rule accepts only [A-Za-z0-9_-], so packaging conventions drop the extension entirely. The failure is silent, which is what makes it a classic troubleshooting trap.
Where this comes from
- Cited
- manual page run-parts(8)
Practise this
Reading one question is not practice. The trainer will draw a short set from objective 107 and space the ones you get wrong.
More questions on this objective
- The account alice already belongs to the supplementary groups audio and video. You must additionally put her in the group developers while keeping her existing memberships. Which command does that? machine-checked
- A departing employee's account bob must be deleted together with his home directory and mail spool. Which command does all of that in one step? machine-checked
- You want every newly created account to start with a company-standard .bashrc already in its home directory. Where do you place that file? machine-checked
- On a host whose accounts come partly from local files and partly from a directory service, `grep alice /etc/passwd` returns nothing even though `id alice` works. Which command shows alice's account entry the way the system itself resolves it? machine-checked
- Policy says passwords must be changed at least every 90 days, and the account carol must comply. Which command sets that maximum password age? machine-checked
- A line in /etc/group reads `developers:x:1500:alice,bob`. What does the final field contain? machine-checked