autofs for /home: exclude admin users

Felix Natter fnatter at gmx.net
Sun Mar 31 12:25:36 UTC 2024


hello debian-users,

I configured autofs for /home on Ubuntu 22.04:

*     -fstype=nfs,rw,soft,bg,intr  SERVER:/share/&

But now the login as "admin" does not work any more, since
it tries to mount SERVER:/share/admin -> Is it possible to exclude
a user from automounting? 

The workaround [1] I use is this:

admin -fstype=nfs,rw,soft,bg,intr  localhost:/export/admin_homes/&
*     -fstype=nfs,rw,soft,bg,intr  SERVER:/share/&

where /export/admin_homes/admin is just a normal directory.

[1] https://serverfault.com/questions/245121/how-to-prevent-autofs-from-mounting-over-specific-directories

Is this a valid solution? Will it work on Debian/Ubuntu/... also in the
future?

Many Thanks and Best Regards,
Felix
-- 
Felix Natter





More information about the ubuntu-users mailing list