autofs under /
I cannot remember how I did this back in the day, and hoping you guys can help.
The below works fine when I do a standard NFS mount: Code:
mount server:/storage/admins /admins My /etc/auto.master file: Code:
/admins /etc/auto.admins Code:
. -fstype=nfs,rw,hard,intr server:/storage/admins #just let me put it under /admins!!!! Code:
/admins/Why-do-I-need-this-additional-folder?!??? |
seeing as mounting to / is a VERY bad idea
BUT mounting to /mnt/File-Name ( or /admins/Why-do-I-need-this-additional-folder?!???) is because you do not want to give ROOT command to ANYbody and anything using the mount point that is just asking EVERY bad guy on the net to PLEASE HACK ME - here i will make it VERY easy - you will already have ROOT privilege!!! |
I guess I'll just have to do a symbolic link.
Code:
ln -s /mnt/admins /admins |
You're looking for the
* blahblah srv:/dir/& syntax eg * -fstype=nfs,rw,hard,intr server:/storage/admins/& |
Quote:
Case closed. |
Another question. How do I get /admins to always be visible without doing a hard mount? Is this possible to do with autoFS and automount?
|
What do you mean by hard mount? If the src is exported then autofs should find it when you try to use it.
You may want to add /net -hosts in /etc/auto.master to auto (lazy mount) browse all nfs exports available. |
but my question is WHY mount a folder directly to /
and WHY do you want to give EVERYONE how has access to the partition on that server root permission and privilege and SELinux root context . The "crackers" just love this as much as having the system password = password user = user but this is your system WE ( the rest of the net)JUST HAVE TO LIVE ( or die) with it. |
Quote:
Code:
ls / Code:
ls /admins Code:
mount -t nfs server:/storage/admins /admins Quote:
Quote:
Quote:
|
I solved that problem about visibility of the imported/exported forlders. I set autofs to create folders in some folder like "/autofsfolders/<server_name>/<folders>" and then create soft link in the desired spot.
In your case, I would set autofs to create admins in /autofsfolders/server/admins, and then create softlink to root folder ( /admins ). So link will be visible and available from file managers. |
All times are GMT -5. The time now is 05:30 AM. |