How to mount a local folder with autofs? bind doesnt seem to work

I want all the users to automount from a NFS server except for a few accounts that should use the local home folder. Thus each client computer (and the nfs server) has a few folders in /home, the rest mount from the nfs server into /home as well. Is there a way to accomplish this?

As I understand it, autofs basically will put a mount over /home thus obscuring anything in the “real” /home. So I would need to move the local folders out and put them elsewhere (ie. /export), then do a bind mount. I could also create a symbolic link in the real /home so I’m covered if autofs breaks down. (I know another workaround is to mount elsewhere instead of /home but it is important all the home folders are in /home due to some legacy software issues)

auto.master

...
/- auto.local
/home auto.home

auto.home

* -fstype=nfs,rw,sync nfs-server:/home/&

auto.home

/home/local -fstype=bind :/export/local

Unfortunately this doesn’t work. I get the error:

do_mount_autofs_direct: failed to create ioctl fd for /home/local

I found out this is because I have a /home/local symbolic link to /export/local. I’m not sure why this would cause a problem. Upon deleting it, it still gives me an error:

handle_packet_missing_direct: failed to create ioctl fd for /home/local

As a sanity check, I did confirm that manually doing the bind mount does succeed.

I’d appreciate any recommendations. I suppose another workaround would be to somehow setup so a symbolic link gets created whenever autofs starts up. Not sure how to do that

I am on an old system ubuntu 18. autofs version is 5.1.2.