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.
|
 |
01-06-2003, 01:37 PM
|
#1
|
Member
Registered: Aug 2002
Location: England
Distribution: SuSE 8.1
Posts: 84
Rep:
|
Connecting Windows Shares
Hi, I'm having a few problems when I try and mount a Windows share on my SuSE box.
I've tried the following.
mount -t //server/share /Downloads = (didn't work)
and
smbmount \\server\share -c mount /Downloads = (Could not resolve mount -c) I believe this was due to me not adding the username/password
So I tried this.
mount -t smbfs -o username=name,password=pwd \\server\share /Downloads
and this
smbmount -o username=name,password=pwd \\server\share /Downloads
and this
smbmount -o username=name,password=pwd \\server\share -c mount /Downloads
Both of these result in the follwing, but it doesn't mount the drive.
Usage: mount.smbfs service mountpoint [-o options,...] Version 2.2.3a
Options: (then the list of options)
This command is designed to be run from within /bin/mount by giving the option '-t smbfs'.
I can ping the windows server that I want to mount.
I created /Downloads as the root so this should be the right mountpoint.
Can anyone advise on what is going wrong, why I can't mount the drive and why, when I use the -o option all I get is a list of options?
tarverymuch

|
|
|
01-06-2003, 02:12 PM
|
#2
|
Member
Registered: Nov 2002
Location: CH-3416 Affoltern
Distribution: (SuSE 8.0), Mandrake 9.2
Posts: 58
Rep:
|
Hi!
First of all, I assume you tried to mount as root? By standart, noone else can do this.
Second, it depends of windows you are using. Win98 --> no prob, winNT, 2000, XP, you will have work with for w$ known users. Since I had no need to to this yet, I can't give you a working solution by heart...
***
mount -t //server/share /Downloads = (didn't work)
***
Here i hope you only forgot to copy the smbfs tag...
What does
***
smbclient -L **server**
***
say?
Especially with W98 as user "guest"?
Adrian
|
|
|
01-06-2003, 02:14 PM
|
#3
|
Member
Registered: Jun 2001
Location: Centralia, WA
Posts: 274
Rep:
|
Got this from www.rootprompt.com:
The world's shortest SAMBA How-To:
Most Samba how-to articles start off with how to write a configuration file so that your linux box can export a disk or print share that could be read by a windows client on the same network. I think this is a big mistake. The first thing you should show someone is the simplest possible command that acutaly makes something interesting happen.
Most Samba how-to articles start off with how to write a configuration file so that your linux box can export a disk or print share that could be read by a windows client on the same network. I think this is a big mistake. The first thing you should show someone is the simplest possible command that acutaly makes something interesting happen. The time to explain the smb.conf file is when the next most interesting, complex experiment requires it, not before. There are a few very interesting and useful commands you can type that don't require that smb.conf even exists, let alone that the smbd and nmbd deamons are running.
Without further adieu, here is the simplest command:
smbclient -L server1 -U user%pass
If you type this command into a bash prompt on a linux box, it will attempt to contact the machine with netbios name 'server1' on your network and get a list of all the disk and print shares it is exporting to the windows network neighborhood. It will do so using the username 'user' and password 'pass'. If you, as I do, run linux on your office workstation on a lan with a bunch of machines running windows, this is the first thing you would want to do.
The next most interesting command looks like this:
smbclient //server1/share1 -U user%pass
This will attempt to connect you to the remote disk or print share 'share1' on the machine with netbios name 'server1'. If successful, you will be sitting at a command prompt at which you can use commands like cd, ls, get, and put, mkdir, rmdir, rm, ..., provided, of course, the username and password you used allow you such access to the remote share. If '//server/share1' is a print share, the command 'print file1' will send the local file 'file1' to the printer. If the printer is a postscript printer, you are in luck as most linux software prints to postscript files by default. If it is an ink jet printer, then you will need to use ghostscript to convert the postscript file to a file of the printer's format first, then send that file with smbclient.
Now go have fun, y'all
|
|
|
01-06-2003, 02:16 PM
|
#4
|
Member
Registered: Nov 2002
Location: CH-3416 Affoltern
Distribution: (SuSE 8.0), Mandrake 9.2
Posts: 58
Rep:
|
I forgot:
smbmount is not for you to use, but for the mount command. Always
***
mount -t smbfs //...
***
I for myself resolved most problems by an appropriate entry in fstab.
|
|
|
01-06-2003, 09:10 PM
|
#5
|
Member
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498
Rep:
|
The destination mount point must exist.
mkdir /mnt/doze
--tarballedtux
|
|
|
01-06-2003, 11:48 PM
|
#6
|
Member
Registered: Jul 2002
Posts: 143
Rep:
|
Quote:
So I tried this.
mount -t smbfs -o username=name,password=pwd \\server\share /Downloads
and this
smbmount -o username=name,password=pwd \\server\share /Downloads
and this
smbmount -o username=name,password=pwd \\server\share -c mount /Downloads
|
you have the slashes messed up.
it's :
mount -t smbfs -o username=user,password=password //netbiosname/sharename /path/to/mount/point
|
|
|
01-07-2003, 11:12 AM
|
#7
|
Member
Registered: Apr 2001
Location: Earth
Distribution: Red Hat, Fedora Core
Posts: 44
Rep:
|
Quote:
Originally posted by turnip
you have the slashes messed up.
it's :
mount -t smbfs -o username=user,password=password //netbiosname/sharename /path/to/mount/point
|
YUP, turnip is correct, that command should fix the issue.
|
|
|
01-08-2003, 12:10 AM
|
#8
|
Member
Registered: Nov 2002
Location: New Jersey
Distribution: rh 8.0
Posts: 45
Rep:
|
mount -t smbfs -o username=administrator //computername/sharename /mnt/computername/sharename
The first part mount -t smbfs tells unix your mounting samba share
second part -o username=administrator gives windows client username command sent without password should generate request from client for password if not then add password=whatever it
third part //computername/sharename network path of windows client
forth part /mnt/computername/sharename linux path to share once mounted this dir must exist for this to work for admintative sake I use same as path ../computername/sharename
|
|
|
01-08-2003, 06:23 PM
|
#9
|
Member
Registered: Aug 2002
Location: England
Distribution: SuSE 8.1
Posts: 84
Original Poster
Rep:
|
Hi all and thanks for your input, I still haven't managed to mount the drive but some of your suggestions have worked and left me with more answers.
ajk - when I typed smbclient -L **server** I got the following:
added interface ip=xxx.xxx.xxx.xxx bcast=xxx.xxx.xxx.255 nmask=255.255.255.0 (external NIC)
added interface ip192.168.1.100 bcast=192.168.1.255 nmask=255.255.255.0 (internal NIC)
But then i also get 19 lines of this:
tdb((null)):tdb_ex: could not open file //var/lib/samba/unexpected.tdb: No such file or directory
then:
Connection to **server** failed
I don't know what this means? Is samba not installed properly?
The share I'm trying to connect to is on a Win2k Server if this makes any difference?
d3funct - I tried the command (smbclient -L server1 -U user&password) I got the same message as above due to -L I suppose.
Then this: Got a psitive name query response from 192.168.1.103 (192.168.1.103)
Then I got the same error message about tdb_openex: could not open file //var/lib/samba etc...
After that error message I got a list detailing the Domain, OS, the shares on that system including the Downloads directory that I'm trying to connect to. It also listed the other Windows systems on the network (win2k/XP workstations)
When I typed "smbclient //server1/share1 -U user%pass I got the command prompt and like you said I could use the cd ls etc... and could view all the contents of the Win2k Server share.
The directory had been created as root and all operations are being carried out as root.
turnip/ry I tried it using // instead of \\ and still got the same error message...(tdb((null)): tdb_open_ex: could not open file //var/lib/samba/unexpected.tdb: No such file or directory)
My conclusion is that there is something missing in samba, would this be right? if so what can I do now to resolve this?
Thanks again for all your help.
|
|
|
01-09-2003, 01:48 PM
|
#10
|
Member
Registered: Aug 2002
Location: England
Distribution: SuSE 8.1
Posts: 84
Original Poster
Rep:
|
Finally Got it mounted
I found the answer to my problems on this site
http://susefaq.sourceforge.net/samba.html
When I removed swat stream tcp nowait.400 root /usr/sbin/swat swat from inetd.conf and restarted inetd.conf I ran the mount command that was advised and everythings sorted
Thanks for all your help...
|
|
|
All times are GMT -5. The time now is 11:02 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
|
|