Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Rep:
Automating Linux/Win file sharing on startup
I can successfully connect to Linux and Windows shares using Samba and LinNeighborhood, which is a cool little app that emulates the Windows Network Neighborhood environment. The problem is trying to automate my Linux box to mount the shares automatically on startup. I created a smbmount script for each share and added them to my rc.local file, but I see errors flying by during bootup and it doesn't work. Maybe I'm using the wrong file for this (another rc file?), or the wrong syntax? Please help if you can. Here's the syntax I'm using:
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Thanks for your advice.
I tried adding the above lines to my fstab, and I assume this is the wrong entry format, as it didn't work. I also tried the following format, which didn't work either:
mount -t smbfs -o user=<user>,passwd=<password> //<server>/<dir> /<local>/<dir>
Both returned boot log errors of "bad format".
What is the proper entry format for auto-mounting Samba shares in /etc/fstab ?
Thank you!
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Quote:
Originally posted by deesto Thanks for your advice.
I tried adding the above lines to my fstab, and I assume this is the wrong entry format, as it didn't work. I also tried the following format, which didn't work either:
mount -t smbfs -o user=<user>,passwd=<password> //<server>/<dir> /<local>/<dir>
Both returned boot log errors of "bad format".
What is the proper entry format for auto-mounting Samba shares in /etc/fstab ?
Thank you!
In case anyone's interested, I solved my problem by moving the "mount" command above from fstab to /etc/rc.d/rc.local
It works just fine now.
Thanks.
i'm not too sure that all those options you use are really taht valid. the file and directory mask should really be defined on the server side, not locally and so forth.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Quote:
Originally posted by acid_kewpie i'm not too sure that all those options you use are really taht valid. the file and directory mask should really be defined on the server side, not locally and so forth.
Thanks Chris. Could you please explain this comment? How do I define these on the "server side"?
well in smb.conf you would set "directory mask = 022" or whatever. these options are listed in the smb.conf man page.. oh that's if you're sharing from linux.. which you're probably not are you? ahh that'll not be possible from windows... DOH!
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Actually, I'm doing both... let me explain.
I have a network with one Win2K box, one WinXP box, and two Linux RH 7.3 boxes, one of which is very old and I'm trying to set up as a non-GUI server, and the other is a little newer system w/KDE that I'm working on right now. Since I only have one monitor for the two Lin boxes (and a very bad KVM switch), I'm using SSH from this box to administer the Linux "server". Sharing between the two Linux boxes and the Win2K box is my main concern.
I added the lines above to my /etc/fstab on this box. This easily mounted the Win2K shares on this Linux box, no problem. The problem seems to be getting the right syntax for mounting the other Linux box's shares to this box. I added a similar line for this purpose, but the shell spit back a ton of errors during boot. Is the syntax different when trying to mount another Linux file system?
And if/when I ever figure this out, the next step is trying to print form this Linux box to the printer attached to the Win2K box... I'm at the end of my rope on that one.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Anyboy know a quick way to script/automount a linux share on a Windows 2000 box? I have mapped the Linux share as a W2K drive, but I would like to automate the username/password combo so I don't get a prompt for the password each time I boot.
Did you get your windows 2k mounting issue solved? You can creat a "startup.bat" file the mounts your shares and add it to the user or domain you want it to start up on...
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
Quote:
Originally posted by nuzzy Did you get your windows 2k mounting issue solved? You can creat a "startup.bat" file the mounts your shares and add it to the user or domain you want it to start up on...
No, I haven't, and that's exactly what I need to do! What is the syntax for adding a network share, user name, password, and Windows "drive" letter to a start-up .BAT file?
Thank you!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.