Signal9Signal9 — home
online
back to labs

autofs: Automount Remote Users' Home Directories with a Wildcard Map

MediumRHCSA Prep15 min
The brief

remoteuser1, remoteuser2 and remoteuser3 have their home directories set to /rhome/<user>, but nothing exists there, so every login drops them in /. Their real home directories sit on the file server's export, one directory per user, at /srv/nfs/homes/<user> (read-write).

1. Configure autofs so /rhome/<user> is mounted from the export the moment it is used.

2. Remote users are added every week. A home that appears on the export later must mount too, without anyone editing the map.

3. autofs must start at boot.

About this lab box: it can't reach an NFS server, so the export is a local directory and your map entry mounts it with a bind mount instead of server:/path. The master map, map file, wildcard key and service are exactly what you'd write on the exam. After changing the master map, restart autofs; reload isn't wired up on this box. The ticket is in /root/case/brief.txt.

What you'll do
  • Add an autofs master map entry and an indirect map
  • Serve every user's home with one wildcard map line using & substitution
  • Enable autofs so the automounts return after a reboot

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