LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-14-2001, 10:15 PM   #1
Ge0ph
LQ Newbie
 
Registered: Oct 2001
Posts: 24

Rep: Reputation: 15
Mount network share at startup.


How can I mount a network share on my W2k server so I will mount at startup?
 
Old 10-17-2001, 12:51 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I guess you could put it in the startup scripts.

the bad thing is your password is in there so protect the file with the script in it, don't use the same password anywhere else

I use this

mount -t smbfs //win2k/pub /lan/win2k -o username=david,password=foobar

or you could use smbmount


[david@ccxxxxxx-x david]$ mount
/dev/md1 on / type ext2 (rw)
none on /proc type proc (rw)
/dev/md0 on /boot type ext2 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
automount(pid815) on /misc type autofs (rw,fd=5,pgrp=815,minproto=2,maxproto=3)
//winme/pub on /lan/winme type smbfs (0)
//win98/pub on /lan/win98 type smbfs (0)
//win2k/pub on /lan/win2k type smbfs (0)
 
Old 10-17-2001, 04:27 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you rteally should use an /etc/fstab entry, as that's what it's there for, the equivalent line for that mount command would be:

//win2k/pub /lan/win2k smbfs username=david,password=pass

well, execpt the password,cos i hate all that foo crap.
 
Old 10-17-2001, 09:53 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I don't use fstab this way.

It is ok to put it in there with the noauto option.

then it would serve as a shortcut to mounting //whatever/share to a given place without typing the whole thing, sort of like your cdrom, you can just type mount /dev/cdrom and it will mount to the designated place.

The problem is if your system boots and those shared drives are not there to mount it will be trouble.

I just ssh into my machine and do the mount.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 02:35 AM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 12:34 PM
Mount a NETWORK windows partiton on startup ? saustin99 Linux - Networking 3 08-05-2005 09:20 AM
cant mount winxp share m_u_y_m_u_y Linux - Networking 4 10-17-2003 02:05 AM
Cannot mount an NT network share pharpe Linux - Networking 3 04-29-2002 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration