Signal9Signal9 — home
online
back to labs

autofs: Mount a Team Share and an Archive Image on Demand

MediumLFCS Prep20 min
The brief

Users keep opening two locations, and neither should be mounted all the time:

/shares/projects is the team directory /srv/exports/projects (read-write)

/shares/archive is the ext4 image /srv/images/archive-2025q3.img (read-only)

Set both up with autofs under an indirect map for /shares. Each mount should appear the moment someone uses the path and go away after 30 seconds idle, and the configuration has to live in files so it comes back when autofs restarts. The ticket is in /root/case/brief.txt.

This box has no systemd, so start or restart the daemon with service autofs start (on a real host you would use systemctl enable --now autofs). Grading drops a fresh file into the team directory and reads it back through /shares/projects, reads the archive's contents, and dumps the configured maps with automount -m.

What you'll do
  • Write an autofs master map entry and an indirect map
  • Automount a local directory and a loop-backed filesystem image
  • Set an idle timeout and mount options per entry

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.