Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-03-2002, 11:42 AM
|
#1
|
Member
Registered: May 2002
Location: NY, USA
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:
smbmount //<server>/<domain> /mnt<server>/<domain> -o username=<user>%<password>,fmask=644,dmask=755,uid=0,gid=0,ip=<server_IP>,debug=0,workgroup=<group>, port=139
Thanks very much in advance!
|
|
|
07-03-2002, 12:00 PM
|
#2
|
Member
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388
Rep:
|
Add the mounts you want to /etc/fstab
Regards
|
|
|
07-03-2002, 02:48 PM
|
#3
|
Member
Registered: May 2002
Location: NY, USA
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!
|
|
|
07-05-2002, 09:47 AM
|
#4
|
Member
Registered: May 2002
Location: NY, USA
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.

|
|
|
07-05-2002, 09:56 AM
|
#5
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
no, that's a poor solution, not advised
if you read the man page for fstab you'd be able to easily convert your mount command to:
//<server>/<domin> /mnt<server>/<domain> username=<user>,password=<password>,etc,etc,etc
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.
|
|
|
07-05-2002, 01:27 PM
|
#6
|
Member
Registered: May 2002
Location: NY, USA
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"?
|
|
|
07-05-2002, 02:06 PM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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!
|
|
|
07-05-2002, 04:05 PM
|
#8
|
Member
Registered: May 2002
Location: NY, USA
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.
|
|
|
07-07-2002, 02:06 PM
|
#9
|
Member
Registered: May 2002
Location: NY, USA
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.
|
|
|
07-17-2002, 06:27 PM
|
#10
|
Member
Registered: Aug 2001
Location: New Hampshire, USA
Distribution: Ubuntu 6.06 LTS
Posts: 204
Rep:
|
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...
|
|
|
07-18-2002, 06:24 AM
|
#11
|
Member
Registered: May 2002
Location: NY, USA
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!
|
|
|
09-11-2002, 12:59 PM
|
#12
|
Member
Registered: Jul 2001
Location: Earth
Posts: 164
Rep:
|
You could just use smbuseradd to add a samba user and make the user/passwd the same as you use to log into your win2k machine.
That way it will mount it automatically everytime you logon to your w2k box....
|
|
|
All times are GMT -5. The time now is 01:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|