Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've got Samba shares and NFS shares on other machines on a home network that I would like to mount when booting Linux.
Several sites and books I've looked at have recommended placing entries in fstab to do this, and have shown the synax (e.g. Christopher Negus' Linux Bible). However, when I try to do this, I come up against the obvious problem that the network interface is not up at that point, and consequently, the shares aren't available. I posted this problem on a Samba newsgroup, and everyone suggested using automount instead.
But this still doesn't explain why I keep reading that it can be done via fstab. I know I could use the noauto option and mount them manually, but I believe this shouldn't be necessary.
Don't worry about the options. The important thing is "nfs", that tells that it is a network mount. The other parameters mean
rw = read/write,
bg = if for any reason the mount cannot be completed, background the mount process (recommended)
wsise,rsize = "block size" of writes, reads, I am reading big files, so larger means more efficient. You should leave that out first
nfsvers=3 use version 3 of nfs, kernel must support it, server must support it. Recommended.
You can do the same with samba mounts, EXCEPT for one quirk. Samab wants a password to mount, and you could put the password into the fstab file, open for prying eyes. There are more methods of autheticating to the samba server, which may or may not work. If no one else has access to the machine, it may be ok, but most likely it's not. You would have the same problem with automount, by the way.
I do it differently, I allow a "user mount" (the user being me) to mount a share on demand in teh session; here's from my desktop's fstab:
When I then mount /mnt/win/myarea, I'll be prompted for my samba passwd on the remote server. If you want to mount at startup, add password=... to the options. For the user option, you will need to add suid privileges to smbmount. It will tell you.
The UID and GID entries are convenient. The samba protocol doens't knwo about those, so you make the files *appear* to be owned by you with the uid/gid values (which should be yours).
Try a nfs thing first and see if that works. The progress to a samba entry in fstab.
Well, despite what I thought, it seems I can mount Samba shares using fstab. I don't know why this didn't work before - I think I was using different syntax, perhaps. Funny that no-one on the Samba mailing list set me straight on this issue.
I'm currently running a Slackware 8.1 server and a 9.0 desktop and am interested in doing quite a similar thing; I have a full-access share (via) samba on the server, open to the entire windows network. I would also like to mount this share (full read/write access) on the 9.0 box at bootup, as something akin to "/shares/files" or something.
For a "simple" share as described above, what would the entry in fstab be?
Should I put the mount command into a global login script?
The downside is that your password is in that file as discussed above.
Change the uid/gid values to your actual values.
You don't need to put your name and password in /etc/fstab where anyone can see it (even non-administrators on most systems). You can put it in a credentials file in your own directory and give that chmod 400 attributes so no one can see it. Here's what it looks like:
I know it's a bad security risk, but I'm running this server from behind several firewalls and it's just connected to two other computers (yay hosts.deny) and it's wide open to those two computers; anonymous wrx access. Hopefully I won't have to deal with users or anything