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 01-06-2003, 01:37 PM   #1
Tezdread
Member
 
Registered: Aug 2002
Location: England
Distribution: SuSE 8.1
Posts: 84

Rep: Reputation: 15
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
 
Old 01-06-2003, 02:12 PM   #2
ajk
Member
 
Registered: Nov 2002
Location: CH-3416 Affoltern
Distribution: (SuSE 8.0), Mandrake 9.2
Posts: 58

Rep: Reputation: 15
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
 
Old 01-06-2003, 02:14 PM   #3
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
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
 
Old 01-06-2003, 02:16 PM   #4
ajk
Member
 
Registered: Nov 2002
Location: CH-3416 Affoltern
Distribution: (SuSE 8.0), Mandrake 9.2
Posts: 58

Rep: Reputation: 15
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.
 
Old 01-06-2003, 09:10 PM   #5
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Rep: Reputation: 30
The destination mount point must exist.
mkdir /mnt/doze



--tarballedtux
 
Old 01-06-2003, 11:48 PM   #6
turnip
Member
 
Registered: Jul 2002
Posts: 143

Rep: Reputation: 15
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
 
Old 01-07-2003, 11:12 AM   #7
ry
Member
 
Registered: Apr 2001
Location: Earth
Distribution: Red Hat, Fedora Core
Posts: 44

Rep: Reputation: 15
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.
 
Old 01-08-2003, 12:10 AM   #8
Micro
Member
 
Registered: Nov 2002
Location: New Jersey
Distribution: rh 8.0
Posts: 45

Rep: Reputation: 15
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
 
Old 01-08-2003, 06:23 PM   #9
Tezdread
Member
 
Registered: Aug 2002
Location: England
Distribution: SuSE 8.1
Posts: 84

Original Poster
Rep: Reputation: 15
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.
 
Old 01-09-2003, 01:48 PM   #10
Tezdread
Member
 
Registered: Aug 2002
Location: England
Distribution: SuSE 8.1
Posts: 84

Original Poster
Rep: Reputation: 15
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...
 
  


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
Samba not connecting to windows shares, help pls john_d13 Linux - Software 0 12-18-2004 12:27 AM
Connecting to shares on a Windows machine jrdioko Linux - Newbie 12 08-15-2004 03:57 PM
samba and connecting to shares citrus Linux - Software 1 03-17-2004 02:51 PM
Connecting to windows shares major_error Linux - Networking 0 02-17-2004 02:56 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM

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

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