0

My problem is similar to that described in Need example use of autofs.master.d/:

I wanted to mount individual users' home directories to /home/*user* using both, * wildcard and directory /etc/auto.master.d in SLES15 SP4, but when I try to mount some directory via ls -l /home/*user*, nothing happens (even when having activated automount debugging, I see no log messages related to my attempt to mount).

I've created an /etc/auto.master.d/homes, containing /home /etc/auto.homes, and the latter file itself contains * -bg,rw,hard,intr,nfsvers=3 nfs.server.org:/exports/home/&.

I can test-mount my test-user's home directory manually without a problem, however.

I'm not quite sure I understood how to use /etc/auto.master.d correctly, so an answer explaining my error could also point me in the right direction.

U. Windl
  • 1,095
  • 7
  • 21
  • Auto.master gives the global parameters. You probably want auto.net for user-named NFS mounts. Can't write an example now until Monday. Ping if you need one still – roaima Feb 03 '23 at 13:03
  • @roaima `/etc/auto.net` is a *program map*, and `/etc/auto.net` will mount everything a specific host will export. Not what I wanted to do! – U. Windl Feb 03 '23 at 13:09

1 Answers1

0

Found the "solution", but not the reason:

When replacing +dir:/etc/auto.master.d (that should include /etc/auto.master.d/homes) with /home /etc/auto.homes, then it (/etc/auto.homes mounting directories in /home) works.

However the comment in auto.master says:

# Include /etc/auto.master.d/*.autofs
# The included files must conform to the format of this file.
#
#+dir:/etc/auto.master.d

So I assumed that including a file is the same as including the content of the corresponding file literally. Obviously not true.

Update

Eventually I found it in "auto.master(5)" for "map type" dir:

(...) The name of file to be included must be ended with ".autofs". (...)

Final Remark

In general reading before typing helps: The comment in the file says: "Include /etc/auto.master.d/.autofs*"

I noticed it only after having found the solution. Maybe it's time to start the weekend now...

U. Windl
  • 1,095
  • 7
  • 21