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.
|
 |
09-12-2001, 12:57 PM
|
#1
|
Member
Registered: Feb 2001
Posts: 51
Rep:
|
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?
|
|
|
09-12-2001, 01:25 PM
|
#2
|
Member
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184
Rep:
|
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.
|
|
|
09-12-2001, 01:43 PM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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...
|
|
|
09-13-2001, 01:31 PM
|
#4
|
Member
Registered: Feb 2001
Posts: 51
Original Poster
Rep:
|
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???
|
|
|
09-13-2001, 02:14 PM
|
#5
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
09-13-2001, 02:25 PM
|
#6
|
Member
Registered: Feb 2001
Posts: 51
Original Poster
Rep:
|
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.
|
|
|
09-13-2001, 03:06 PM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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...
|
|
|
09-14-2001, 02:31 PM
|
#8
|
Member
Registered: Feb 2001
Posts: 51
Original Poster
Rep:
|
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?
|
|
|
09-14-2001, 03:33 PM
|
#9
|
Member
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184
Rep:
|
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?
|
|
|
09-17-2001, 02:49 PM
|
#10
|
Member
Registered: Feb 2001
Posts: 51
Original Poster
Rep:
|
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.
|
|
|
09-17-2001, 03:29 PM
|
#11
|
Member
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184
Rep:
|
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.
|
|
|
09-17-2001, 04:03 PM
|
#12
|
Member
Registered: Feb 2001
Posts: 51
Original Poster
Rep:
|
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?
|
|
|
09-17-2001, 04:34 PM
|
#13
|
Member
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:43 AM.
|
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
|
|