LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-12-2001, 12:57 PM   #1
thetruevoice
Member
 
Registered: Feb 2001
Posts: 51

Rep: Reputation: 15
mounting network drives


I can now actually mount a filesystem from across the network (using mount.smbfs), but how can i mount the drives i want automatically at boot up?
 
Old 09-12-2001, 01:25 PM   #2
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
try

# mount -t smbfs //server/share /mnt

In later Linux-versions, the mount - command recognizes the smb-filesystem. If this works, you can mount shares automatically at bootup by adding lines to your /etc/fstab:

//server/share /my/mountpoint smbfs defaults 0 0

Haven't tried this myself yet, but I don't see any reason why it shouldn't work. You might run into some issues if the server with the shares is not up.

You might also have to set a username and password. Have a look at the manpage for the mount command for the right options on that one.

HTH Steave.
 
Old 09-12-2001, 01:43 PM   #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
the fstab thing will work. It can be a real bastard tho, if your server is for some reason not working, as it will have to timeout, which can take yonks, and cna be really really annoying. I guess there's arguments for smbmount to be used in a file like /etc/rc.local with a ping before it to ensure a conenction is there at some level.

my working fstab line is:

//simon/simon /simon smbfs username=acid,password=kewpie,user

this mounts it as non root as i'ev denied root login's for samba. you can change the username to root just the same if you want. mounting as a user does require a efw more chanegs, but none that you won't be prompted for...
 
Old 09-13-2001, 01:31 PM   #4
thetruevoice
Member
 
Registered: Feb 2001
Posts: 51

Original Poster
Rep: Reputation: 15
ok, i fixed one of two problems. acid i added the line you said to the fstab and it did mount correctly on reboot. so know i can get from my linux server to my xp box. but on that xp box on another partition i have mandrake 8. that computer has another name than the xp partion does. (dont think that matters) i have all the info setup up (i believe) correctly between the mandrake/xp box and the red hat server. i can ping back and forth, but i cant mount either way. maybe im just entering it wrong.

trying to mount mandrake (shaitan) to red hat (god) i tried...

mount -t smbfs //god/home/public /god

i also tried it a couple other ways like adding in username=thermos and password=asdflk

unfortunately i forgot to bring the error messages in to work with me but let me try to describe them and maybe you'll can figure it out. if not ill bring them in exactly tomorrow.

again unfortunately i dont remember exactly what error message went for what.

invalid name share prompt command for space

another time it asked me for a password and the password for thermos and root didnt work. i dont have any other passwords

nebody know y i would have these problems???
 
Old 09-13-2001, 02:14 PM   #5
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
it looks to me like your trying to mount a directory on the remote machine rather than a share. Windoze only ( i think) lets you share entire drives or not at all. Linux lets you choose exactly what and how you share what you do. the syntax goes:

smbmount //host/share /mountpoint

you tried to mount //host/home/public, which is not a vlid share name. configure properly in /etc(/samba)/smb.conf to get it working right.

and erm,.. why differnt names for the same comp0uter? that's just causing trouble. with the same host name you can mount exactly equivalent win/lin shares with the very same fstab line... I think that the smb.conf file actually controls the host name for networking rather than the actual computer name, but it is inferred i think, if no other alternative exists.
 
Old 09-13-2001, 02:25 PM   #6
thetruevoice
Member
 
Registered: Feb 2001
Posts: 51

Original Poster
Rep: Reputation: 15
k, i think i understand. my brain isnt funtioning properly today though. (drank too much last night) : )

1st of all how exactly do i switch my computer name. the only place i know how is in the install

2nd how exactly do i setup the share in the smb.conf

Forgive me if this question is redundant my brain really isnt workin today.
 
Old 09-13-2001, 03:06 PM   #7
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
hostname is set by just running 'hostname newname' not sure what file it changes tho...

shares and all are deifned in /etc/(samba/)smb.conf. ACtually, looking at that file i think that the sahre name is defined by the actuall computer name after all.
there should be an example smb.conf file there already, which has many differnet examples etc...
 
Old 09-14-2001, 02:31 PM   #8
thetruevoice
Member
 
Registered: Feb 2001
Posts: 51

Original Poster
Rep: Reputation: 15
i know its amazing, but im still having problems with this. i wrote down exactly what it said this time. hope it is sufficient. Oh, and guys, preciate the help so far. : )

ok i went ahead and switched the hostname so now i simply have 2 computers: callandor =winxp/mandrake and god=redhat smb server

//god/home/public should be a valid share cause i have the following in smb.conf

comment = Public
path = /home/public
read only = no
create mask = 0664
directory mask =0775
guest ok = yes

so from root prompt i ran...

smbmount //god/home/public /god

it then asks for a password
and ive tried the password for my account and root and no password at all. the error i get is...

session startup failed: ERRSV = ERRbadpw -name/password pair in a tree nnect or session setup are invalid smb connection failed.

now i know my account thermos works in smb cause i can get on with it from xp. anybody know what my prob is?
 
Old 09-14-2001, 03:33 PM   #9
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
and the answer can be so simple!

Here it is:

path = /home/public

doesn't make the share's name //god/home/public. It just defines the local place. Actually, the name of the share is above this section :


[sharename]

comment = Public
path = /home/public
read only = no
create mask = 0664
directory mask =0775
guest ok = yes

So you are sharing /home/public under //god/sharename!

Amazing, isn't it?
 
Old 09-17-2001, 02:49 PM   #10
thetruevoice
Member
 
Registered: Feb 2001
Posts: 51

Original Poster
Rep: Reputation: 15
thnx for the help steve. got that workin wonderfully.

quick question...how do i share a linux folder or mnt on callandor so i can see it on god (smb server) since there is no smb.conf on callandor to setup the share.
 
Old 09-17-2001, 03:29 PM   #11
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
Callandor is a Linux-System, right? God is also?

If both are, you can share and mount files as follows:

add lines to your /etc/exports file. Any folder mentionend in this file will be shared with nfs. If you have a nfs-server running that is. Check with your /etc/inetd.conf file or your /etc/xinet.d directory.

Well adding a line like this:

/share

will share the folder /share with nfs.

To mount it on god do

mount -t nfs /callandor/share /mnt

Hope it works! (I'm not too sure about /etc/xinet.d which is used in later RH-distros....)

Steave.
 
Old 09-17-2001, 04:03 PM   #12
thetruevoice
Member
 
Registered: Feb 2001
Posts: 51

Original Poster
Rep: Reputation: 15
i dont think i have nfs installed, but ill check to make sure. it was my understanding that samba can be used instead of nfs and since i have windows and linux boxes i thought just using samba i could share every properly.

so ur sayin i need to install nfs correct?
 
Old 09-17-2001, 04:34 PM   #13
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
nfs would be the linux/unix way to share files (it is usually compiled with the kernel) Samba is using the smb-protocol that windows uses for filesharing. Using samba to share files between two linux-boxes works. You will need to install samba on callandor though.

HTH Steave.
 
  


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
mounting network drives astroboiii Linux - Networking 15 12-23-2004 09:44 AM
Mounting network drives David@330 Linux - Newbie 3 10-01-2004 02:20 PM
Mounting Network Drives sonikntails Linux - Networking 3 08-12-2002 03:21 AM
mounting network drives Druaga Linux - Networking 1 05-08-2002 08:42 PM
Mounting network drives on bootup manderso Linux - Networking 3 12-17-2001 05:16 AM

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

All times are GMT -5. The time now is 09:43 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