Click to See Complete Forum and Search --> : Samba trouble


Deadhead
01-06-2001, 03:40 AM
I'm trying to network a linux box and a win98se box together. I can ping each box from one another, but I cannot start SWAT through Netscape. I get an error of CONNECTION REFUSED. I'm not sure what's wrong.

Any ideas??

[This message has been edited by Deadhead (edited 06 January 2001).]

[This message has been edited by Deadhead (edited 06 January 2001).]

Mountainman
01-06-2001, 10:59 PM
Dude, your better off not using swat IMHO. Everytime I tried to setup samba with swat it was hosed. If you really want to though, check your inetd.conf file and uncomment it at the very bottom of the file. Run linuxconf and goto the samba area and change One item doenst matter which. for some reason, you have to do that before swat will work.

------------------
---Meddle not in the affairs of Dragons, for thou art but a snack, and tasty with ketchup---
Http://www.geocities.com/mountainmancentral

hndpaul
01-07-2001, 07:12 AM
Agreed Mountainman! You can uncomment the SWAT line in inetd and then launch it from within your browser; however, I've had some real problems with SWAT taking over the configuration, so now just use smb.conf manually- and you learn heaps about networking too!

Paul, UK

gundamfool
01-07-2001, 08:28 AM
I couldn't get swat to work, kept saying connection refused so I just did it manually

scottp
01-07-2001, 10:44 PM
I spent the better part of today, and figured this out.

RH 7.0 does not use inetd it uses xinetd, but it is not normally installed.

You can install it from CD 1 (Binary CD). You can also get it from http://www.synack.net/xinetd

Once that was installed, I found I now have a /etc/xinetd.conf file, and SWAT runs!

Although, I think I agree with the others, manually editing smb.conf might be the better way to go.

BTW: Make a backup copy of your smb.conf file before running SWAT. The original is full of good comments, and swat overwrites them. Also note that smb.conf is not in the /etc directory, it's in /etc/samba/

Scott




[This message has been edited by scottp (edited 07 January 2001).]

guitarlyn
01-08-2001, 12:37 AM
I've got a true newbie'ized Samba setup howto at:
http://www.geocities.com/guitarlynn/samb9x.html

It steers you clear of the most common Samba troubles and doesn't use SWAT. If your not running a firewall, SWAT can truly set your system up to get screwed up.

~Guitarlynn

gundamfool
01-08-2001, 12:57 AM
hmmm, but not for win2k http://www.linuxnewbie.org/ubb/frown.gif

hndpaul
01-08-2001, 05:05 AM
Thanks Scottp!! I'll file that for future reference. Always good to know "how you did it" :-)

Paul, UK

guitarlyn
01-08-2001, 07:17 PM
Win2K throws a whole new ball of #@!!%^ in the Samba box. In my understanding of people that have actually got it to work, you must set all OS's to use non-encrypted passwords (ie..Win2k uses different encryption). Unless you are familiar and willing to do some registry hacking on the Win2K boxes, it will probably prove useless.

~Guitarlynn

gundamfool
01-08-2001, 07:26 PM
oh i setted it already to use clear passwords, just can't get win2k to share its stuff with linux, got linux to share its stuff with win2k...going to install windows 98 to see if it works

gundamfool
01-08-2001, 07:47 PM
oh i setted it already to use clear passwords, just can't get win2k to share its stuff with linux, got linux to share its stuff with win2k...going to install windows 98 to see if it works

PureKrome
01-08-2001, 07:55 PM
I've can use all our win2K machines to access an MP3 share on our linux machine. (around 12+ machines).

But when i try and get a single windows ME machine to connect, it doesn't work!!!!

For the win2K machines, we can only connect if we do NOT provide a username and a password.

But with windows ME, we are only provided a password, so i have no idea WHAT the username is being passed.... (which is probably why it doesn't connect).

Any clues?

-PK-

guitarlyn
01-09-2001, 12:15 AM
But when i try and get a single windows ME machine to connect, it doesn't work!!!!
But with windows ME, we are only provided a password, so i have no idea WHAT the username is being passed.... (which is probably why it doesn't connect).

This may be one of the bugs with Networking in ME (of several documented ones). Most require registry hacks to fix them. Maybe loggin in anonymously might work. (I've never run into a problem with ME if it was setup like my HowTo, but then again I don't use M$ much anymore).


For the win2K machines, we can only connect if we do NOT provide a username and a password.

This would be an anonymous login (can be allowed with the user 'nobody' or 'smbuser' depending on the particular version of Samba. Just watch this type of login, without a good firewall on the Linux box, the whole world can access the same thing!!!

Hope this clears a couple of things,
~Guitarlynn

guitarlyn
01-09-2001, 12:19 AM
Originally posted by gundamfool:
oh i setted it already to use clear passwords, just can't get win2k to share its stuff with linux, got linux to share its stuff with win2k...going to install windows 98 to see if it works

Did you do the registry hack on Win2K to set the encryption to clear passwords (and use "share" level sharing)????

These are the 2 most likely culprits,
~Guitarlynn

PureKrome
01-09-2001, 12:45 AM
Originally posted by guitarlyn:
[QUOTE]

But when i try and get a single windows ME machine to connect, it doesn't work!!!!
But with windows ME, we are only provided a password, so i have no idea WHAT the username is being passed.... (which is probably why it doesn't connect).


This may be one of the bugs with Networking in ME (of several documented ones). Most require registry hacks to fix them. Maybe loggin in anonymously might work. (I've never run into a problem with ME if it was setup like my HowTo, but then again I don't use M$ much anymore).

~Guitarlynn




Hmm... any chance you could drop me some URL's where i can see this DOCUMENTED bug? What about some URL's that show me what hacks i need to do to fix that.... (reg hacks)

and also, the IP of the machine is 10.x.x.x, so good luck getting access to my mp3's if they get through the firewall =)

-PK-

gundamfool
01-09-2001, 12:47 AM
I think lmhosts is the problem, i switched to windows 98 and followed your guide and still same errors....as for win2k i don't belived i setted the share thingy...Heres my lmhosts tell me if its setted right...
==================================
localhost AZNFOOLZ
winbox WINBOX
==================================
my hosts file is
==================================
127.0.0.1 localhost localhost.localhostdomain
192.168.1.1 aznfoolz
192.168.1.2 winbox
==================================
Now when I do smbclient -L WINBOX it takes a bit longer for it to say session request failed, thats the only noticeable change since i transited from win2k to win98 in hope samba would work...

guitarlyn
01-09-2001, 01:36 AM
I think lmhosts is the problem, i switched to windows 98 and followed your guide and still same errors....as for win2k i don't belived i setted the share thingy...Heres my lmhosts tell me if its setted right...

If you enabled Samba as a WINS server, lmhosts shouldn't even matter except as a backup (or "hosts" for that matter). If the "smb.conf" matches, the only other problem I've seen is if User profiles (accounts) were not set up on all machines and the NetBIOS names of the machines (which should be one of the Users). These all have matching passwords. You have enabled the primary login as "Client for Microsoft Networks", restarted Windows and logged in as the NetBIOS name of your Windows computer.
It strikes me as strange, because I had 20+ users with Win98 & ME use this on their systems before ever releasing it to the public, and if followed to the "T", has ever failed to work.
Maybe you missed a step or misinterpredid it?

~Guitarlynn

guitarlyn
01-09-2001, 01:43 AM
[QUOTE]Originally posted by PureKrome:
[B]
Hmm... any chance you could drop me some URL's where i can see this DOCUMENTED bug? What about some URL's that show me what hacks i need to do to fix that.... (reg hacks)
>I was sent them via email from >techrepublic, you can probably find them on >their site with a search, or use keywords >on Google.com
>On second thought, WinME is most likely >using the Name you logged in to your >computer with (using Client for M$ >networks), so as long as that User/password >exists on the Linux machine (and Samba), >you should have no probs there.

and also, the IP of the machine is 10.x.x.x, so good luck getting access to my mp3's if they get through the firewall =)

>You can disable the blocking on that (or >any) private network...if you wish.

Hoping this helps a little more,
~Guitarlynn

gundamfool
01-09-2001, 11:24 AM
Yeah must be me, those netbios name and username stuff kind of got me a bit confused...NETBIOS name on the linux box I set as AZNFOOLZ, am i suppose to make a username for that on my winbox? I made one called XXLINUXX on winbox and linux, if I set the computer name on winbox as WINBOX do i have to make a username for it on linux? As for the socket options, when i ran smbclient it said it was misconfigured and I copied it correctly.....Thanks

guitarlyn
01-09-2001, 06:42 PM
Originally posted by gundamfool:
Yeah must be me, those netbios name and username stuff kind of got me a bit confused...NETBIOS name on the linux box I set as AZNFOOLZ, am i suppose to make a username for that on my winbox? I made one called XXLINUXX on winbox and linux, if I set the computer name on winbox as WINBOX do i have to make a username for it on linux? As for the socket options, when i ran smbclient it said it was misconfigured and I copied it correctly.....Thanks

Aaahhh, I see, total confusion over the naming.....no wonder it doesn't work.
With Samba, or any general network, they search for other things by name and/or ip#. Let's say Linux is "Homer" and WinME is "Bart". Now Homer is on and calls out in a room: "Is anyone out there???". If Bart is also turned on and configured properly, he should call back: "Bart is here, hello Homer!". Now Bart and Homer both know that each other exist. Bart then asks Homer for a file, Homer knows Bart is there, but doesn't know if Bart should be allowed to get any files. The only way Homer can tell is if he has a User in his database that says: "Yes, we know Bart and he can have any of these listed files". This also works vice-versa between the computers. The computers MUST be named different names. The computers MUST also have "Users" created on each computer for all computers on the network so they can tell if they should share files with the other one(s). The computers MUST be in the same Workgroup and preferrably the same subnet. You must log into each computer with the Username you plan on using for the computer you are on (Homer logs in as HOMER, Bart logs in as BART). You must also make file(s) and/or folder(s) available for the other computers to share (otherwise they'll login to the other computer and have nothing to share).
I hope this simplifies the necessary information and clarifies a few things. This should get you going!
~Guitarlynn

gundamfool
01-09-2001, 11:22 PM
So let me get this straight..My computer called HOMER, i have to make a username called HOMER and log on to it...on windows i name the computer BART and log on as BART, and I must make a username called HOMER on BART and a user called BART on HOMER basically right?

guitarlyn
01-10-2001, 01:09 AM
Originally posted by gundamfool:
So let me get this straight..My computer called HOMER, i have to make a username called HOMER and log on to it...on windows i name the computer BART and log on as BART, and I must make a username called HOMER on BART and a user called BART on HOMER basically right?

Exactly!!! And you must make the users BART and HOMER on both computers. This has a tendancy to make NETBEUI seem overly simple....won't be that easy on Linux. Oh, and the NetBEUI protocol MUST be taken off the Windows computer.
~Guitarlynn

gundamfool
01-10-2001, 04:35 PM
Hmmmm...still not working...How do I start samba? i use /etc/rc.d/init.d/smb stop then the start option...probably not the best way to do it....going to try again when i wake up..so tired now

Coral Sea
01-11-2001, 02:43 AM
Sharing Windows 2000 shares on the Linux box should not be a problem w.r.t. passwords. Try this command from the Linux terminal:

smbmount //winbox/c /windows -o username=you,password=passwd,uid=501,gid=501

where winbox is the network name of the Windows 2000 PC, c is the letter of whatever drive you've shared on the Windows box, you is your user name as defined on the Windows box, passwd is the password for that user, and 501 will enable you to write to the Windwows shares from Linux.

I might be wrong here, but I think if you enable password encryption in the smb.conf file and set security = user, then you should be able to access the defined Linux shares from Windows 2000. It works for me with Windows 98 (which also encrypts passwords unless you tweak the registry).

Download the free Samba book from O'Reilly for more instructions. http://www.linuxnewbie.org/ubb/biggrin.gif

------------------
Visit my Web Site at http://members.home.net/2826651556/

gundamfool
01-11-2001, 04:46 AM
YEAH! I did it, I just started my computer and haven't logged in on my windows computer and i did smbclient -L WINBOX and it went through. Then I mounted it and it worked...Setted my printer with drakeconf and printed out stuff to test it and it works..i am so happy http://www.linuxnewbie.org/ubb/biggrin.gif..Thanks everyone for your help...My next step on the journey to more knowledge of linux will be to set up my new hard drive and install a more challenging distro like slackware and then compile the new kernal to it and set everything up again http://www.linuxnewbie.org/ubb/smile.gif...I'll probably be back in the future with more problems http://www.linuxnewbie.org/ubb/smile.gif

Coral Sea
01-12-2001, 08:10 PM
Go with Slackware and you'll be back. For real excitement, try a Debian variant of Linux like Storm or Corel. http://www.linuxnewbie.org/ubb/wink.gif

------------------
Visit my Web Site at http://members.home.net/2826651556/