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


Fermat
01-30-2003, 10:26 PM
After spending countless hours trying to get Samba to work tonight I finally broke through. I have literally spent days on this. I have successfully configured an XP Home, Win98 and RH8. Iam soooo relieved.
Thanks for everyone's help.

bikkr38
01-30-2003, 11:07 PM
please tell me how you did it, two weeks and I still cannot connect from both of my windows boxes, to linux, on one of my computers I can see my computer icon with the name I gave it and that it is a samba server 2.2.7 but when I click on it, asks for a password, type in the password, tells me wrong password, what am I doing wrong, when all three of my machines are on the network in windows I have no problems, printing sharing files or anything, when my machine has linux running, the others cannot send anything to the printer. when I use smbclient and the passwd I set up that works. going nuts please help!!!!!!!!!!

Fermat
01-31-2003, 12:01 AM
I'll try to help. I am by no means an expert. I'm still very new to the world of Linux.
For starters, I'd suggest start small. Don't worry about the printer yet. Get two computers up and running and make sure they can communicate with each other. nmblookup and ping commands for Linux were invaluable. nbtstat and ping commands for Windows are equally as invaluable. Make sure the computers can "see" each other.
I had 3 major problems along the way and this is how I resolved them.
My first problem was a computer naming problem. I tried to keep the same name for my Linuxbox in as many locations as I could find. I changed the computer name so they all matched in my Linuxbox in the smb.conf file, the network adapter GUI and also the hosts file.
Next, I was having a password problem. I kept getting rejected going from both Win>Lin and Lin>Win. I redid my user settings multiple times all with no luck. I think the problem was with PAM. Finally, I got fed up and erased my smb.conf file. My new smb.conf file is extremely small. I'm going to go back and add commands to it as I get more comfortable using Samba. I was having all kinds of trouble configuring my computer with the sample smb.conf files that I'd found on the net, so I saved one copy of my original smb.conf (I called it smb1.conf) and I deleted and made a new smb.conf with very few commands and only 1 share file (for now). My entire smb.conf file is only about 10 lines.
My third big problem took me the longest to fix but was really my own stupidity. When I installed RH8, I believe the default firewall gets set to the highest setting. I never changed it. So, I had no problem going from Lin to Win but I'd get a "network path not found error" every time I tried connecting from a Win box even though my Linbox would show up in Net Hood. I disabled all my firewall rules (for now).
Anyway, it all finally works.
Hope this helps.

ixthus
01-31-2003, 11:26 PM
Originally posted by bikkr38
I can see my computer icon with the name I gave it and that it is a samba server 2.2.7 but when I click on it, asks for a password, type in the password, tells me wrong password, what am I doing wrong

bikkr38,

I had the same issue, to resolve it I created a user w/ password and then created a folder by the same name in /home. So now when I select 'Samba Server' and get the confounded logon prompt, all I have to do is type in my user name and password.


Configuring Samba (http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-samba-configuring.html)

st0rmrd
01-31-2003, 11:51 PM
swat is the only tool I use to set-up samba

anyhow, you need to make sure that you have set-up smbusers to reflect what your samba users are, for example if you have a windows user in the remote machine as user1 with password password1 then you need to let samba know (check your manuals for this, or just type man smbpasswd)

then set-up your shares (here you'll need swat, as far as I know, if you want to do it easily)
remember, under windows, you set-up user-level security, while under linux you set-up share-level if you don't want to be bugged with password (especially if you don't use passwords)

last thing with the printer: usually the command for printing is lpr -P printername filetobeprinted
but if you check man lpr you will notice that there is a command that tells lpr not to format or process the filetobeprinted but send it straight to the printer. why does that help? well, you will need to set-up the printer driver under windows, and this driver usually does all the formating, so if you're going to send something to linux to print change the printing command to this:

lpr -P printername -l filetobeprinted

that tells it to not format anything, and in the end it will return the same printing quality you get if you had the printer hooked up to a windows machine.

I don't remember where to get swat but I know must distributions have it in their packages, if not preinstalled. you'll need to change inetd.conf or xinetd to have it started but that is another question altogether (should be pretty straight forward though). and for any new printers, please use CUPS instead of the old LPRng. it has a web-based configuration accessible in localhost:631 (I think). and BTW, once you get swat started you can access it by localhost:901

stop your firewalls before working these outs (of the net of course) and then enable them with samba support... :D have fun!

bikkr38
02-01-2003, 12:25 PM
tell me what firewall, would be active I don't have any firewall software, except the one with my hub? now about printing here is what I get with nmap -sT ip address
the third line is 515/tcp open printer is that the port to my hub where the printer is attached?

ixthus
02-01-2003, 08:03 PM
Originally posted by bikkr38
tell me what firewall, would be active I don't have any firewall software, except the one with my hub?

I believe RH8.0 installs a firewall by default. In the Gnome menu you can find it under System Settings >> Security Level

Then you want to select customize and check off on eth0

st0rmrd
02-01-2003, 08:38 PM
Originally posted by bikkr38
tell me what firewall, would be active I don't have any firewall software, except the one with my hub? now about printing here is what I get with nmap -sT ip address
the third line is 515/tcp open printer is that the port to my hub where the printer is attached?

well it doesn't sound that it should be open at the firewall... samba intercepts any printer calls and then uses a system() call to the printer, using the lpr command in most cases. maybe the 515/tcp port is open for your printer to use with other linux systems etc. if you're not sure leave it for now and return later.

just to make this clear. if you ONLY use samba on a system, that is that a system connects to other systems only with samba, then the samba ports should only be allowed. I can't help you with the exact port numbers since my firewall uses ready scripts to be configured (I have SuSE), but my best guess would be the usual NetBios ports, around 137,138,139 or something like that. if you have launched nukes on irc on the early days you should remember those ports (it has been ages, though, and that is way I forgot them completely :p)

have you fixed everything else? is printer the last thing? because you should set-up the rest first, for example, even if you don't want to share anything or view anything, make sure it works before going to the printer. it will surely save you trouble debugging any problem later (of course if you don't want to share, after testing and having it work, stop using it. this is only supposed to make you comfortable with samba and checking that you have things set up correctly)

cowanrl
02-02-2003, 12:23 PM
bikkr38:

Usually if you have a firewall issue, you get the "network path not found error" as Fermat described when you click on the Samba server in Windows Explorer.

Since you are getting prompted for a password, they your problem is probably a user permissions issue.

It would be best if you posted the contents of your smb.conf file here so we can see what type of security you specified for your Samba server. Also let us know what Linux Distribution and version you are using.

kingttx
05-15-2003, 07:02 AM
Wow! OK, after 3 weeks of suffering, I finally got it to work. Two things I didn't realize I had done wrong. First, my syntax on security = user was wrong - I had 'usr'. Second, on hosts allow, I had the network IP address off by one digit. :rolleyes: Well, I'm a happy camper. Now to get the roommates' Linux box to do the same.

Happy Linux to all! ;)
Tom

flowrider
05-17-2003, 03:02 AM
I'm still working and struggling with it all.

Fermat, could you possibly post your simplified smb.conf file so I could have a little look see?

Manojo
05-20-2003, 04:36 AM
Yeah good idea.. what is your smb.conf ?