Ubuntu: Using FSTAB to mount by Hostname


I am dealing with an office where are constantly switching computers. I would like to mount some of the windows shared drives onto a Ubuntu PC but FSTAB only seems to take IP addresses.

Is there a way I can mount based on hostname? Also could I have it add and remove mounts based on the naming convention "PHOTOGRAPHER#"

Something like IF PHOTOGRAPHER# appears on network, attempt to mount.

Ideas? Regards,


The official documentation (https://help.ubuntu.com/community/Fstab) says that you can only mount by hostname if the name appears in your hosts file.

Which wouldn't help you because you'd have to constantly update your hosts file.

Would mounting the drives through a file manager work for you? You can do that with server name.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »