View Full Version : Noob SAMBA ?'s
hammah33
2006-01-23, 12:07 PM CST
Here is what I am attempting to do. I have 4 computers networked together with a Linksys WRT54G router. All have win2000 and one machine also has FC4. So on that machine I can either boot win2000 or FC4. This machine is a desktop that uses a wireless PCI card. This machine also has the only printer hooked up to it. What I would like to do is print from the other windows machines to the printer. Now all is fine if all the machines are running windows. If I boot the dual boot machine using FC4, the three other computers can't see the printer.
I have installed SAMBA (yum install samba). Now what do I do? How do I use SAMBA?
Thanks!
weinerdogus
2006-01-23, 03:56 PM CST
This should help get you up and running. http://www.reallylinux.com/docs/sambaserver.shtml
paperdiesel
2006-01-23, 04:05 PM CST
I'll preface this by saying that this is going to be a bigger pain in the ass than you might think. I just went through a similar situation (Mac, XP box, and Linux using the printer attached to the Linux box).
You installed samba, that's good. You'll need to get samba to start at bootup:
1. Open a console
2. Switch to root (su -)
3. Add these lines to the bottom of your /etc/rc.local file:
/usr/sbin/smbd -D
/usr/sbin/nmbd -D
This way, samba will start up when you boot up. Once you've saved the file and are back at the prompt, run those two commands (one-time only, they'll be running automatically next time you boot).
/usr/sbin/smbd -D
/usr/sbin/nmbd -D
4. Go to Desktop -> System Settings -> Printers. Double click on your printer to edit the settings.
5. Click on the "Sharing..." button at the bottom of that dialogue box.
6. Check "This queue is available to other computers".
7. Click OK
8. Click OK
Now your printer is shared on the network. Here comes the hard part..
Windows has no good, efficient way of talking to your linux printer. You have to use either the ****ty Microsoft Image Writer driver, or go download Adobe's Generic Postscript Driver for windows (this is the best option). You could also try to compile the latest CUPS libraries for Windows, but uh.. good luck getting that to work. There are some really good articles on the net about connecting your windows printer to linux. Just google for it.
If you get stuck, let me know. I'll try and retrace my steps for setting up the windows part.
Good luck. Shame on windows for not playing nicely with CUPS. It's worth noting that I configured my Mac to talk to the linux printer in like 30 seconds, using the right driver and everything.
pd
Firewing1
2006-01-23, 04:07 PM CST
yum install system-config-samba
Firewing1
hammah33
2006-01-24, 08:41 AM CST
Thanks for all of the input. I started setting up per the link weinerdogus supplied. I came to a sticking point when I couldn't set up the SAMBA server. So I did what Firewing1 suggested. So I set it up per the instructions weinerdogus supplied and I couldn't get it to work. So I typed (as per paperdiesel):
/usr/sbin/smbd -D
/usr/sbin/nmbd -D
Now I can see the server (called Linux) in windows explorer but as soon as I double click on it it says 'Linux not available
the device is not connected' Any suggestions?
paperdiesel
2006-01-24, 10:59 AM CST
You're most likely getting that message because you haven't configured your samba share to be publicly viewable. You need to configure that samba share. Either google for it, or tell me if you're using gnome or kde, and I'll walk you through it.
pd
hammah33
2006-01-24, 12:49 PM CST
I'm using gnome. I allowed access to everyone but it still didn't work. Thanks.
weinerdogus
2006-01-24, 03:56 PM CST
Have you opened up ports to allow windows to talk to fc4?
open a terminal and as root type:
system-config-securitylevel
in the "other ports" box enter:
137:udp,138:udp,139:tcp,445:tcp
exit
restart samba:
service smb restart
restart the network:
service network restart
your connection should work.
hth
hammah33
2006-01-24, 04:45 PM CST
Thank you, that helped. But still not there yet. I was a little off in my nomencalture earlier. I typed "Now I can see the server (called Linux) in windows explorer but as soon as I double click on it it says 'Linux not available
the device is not connected'". I should have said I can see the workgroup called Linux not the server called linux. Well I can now open the workgroup called linux. Then I can see the server called "Localhost'. Under comments it says 'Samba server'. When I double click on it it says "\\Localhost is not connected. A duplicate name exists on the network"
weinerdogus
2006-01-25, 03:59 PM CST
Try changing the hostname. in a terminal type:
system-config-network
on the "DNS" tab change the "hostname" to something like hammah33.
on the "Hosts" tab, click "new" and enter the ip address of the computer you are trying to connect from.
save the configuration.
restart the network:
service network restart.
go through your steps to connect.
hth
hammah33
2006-01-28, 12:15 PM CST
Ok I did what you said and I got it to work. Thank you. However I found out that saving the configuration overwrote my /etc/hosts file. When I restarted it took about a half an hour to get to the login prompt. Then it gave me the following message when I logged in:
Could not look up internet address for hammah this will prevent GNOME from operating
correctly. It may be possible to correct the problem by adding hammah to the file
/etc/hosts
Everything in GNOME was running extremely slow, some things didn't even work at all. So I added edited my /etc/hosts file. I deleted the new enrty and I added this line:
127.0.0.1 localhost.localdomain localhost
when I re-booted everything was fine again, but of course SAMBA didn't work any more. If I follow all fo your steps I can get SAMBA to work, but I need to make sure that my /etc/hosts file has only the above entry in it before I re-boot.
If I don't have network access until after I get into GNOME, is this a problem? I am having issues with my wireless PCI card. I think this may need to be solved first, then get back to getting SAMBA to work. I will post another topic for my wireless card issue. Thank you for your help!
weinerdogus
2006-01-28, 03:04 PM CST
192.168.0.106 Second
192.168.0.100 SWCC
127.0.0.1 Bailey
this is the contents of my /etc/hosts
yours should be something simmilar.
hammah33
2006-01-28, 03:11 PM CST
Ok, in tinkering a bit more, I figured it out. My /etc/hosts file now looks like this:
127.0.0.1 hammerl.localdomain hammerl
172.16.0.23 HammaLinux
and in system-config-network under the 'DNS' tab it reads hammerl.localdomain. In the SAMBA server
settings under the security tab it is set to share. Now I can boot up fine, no errors and I can see all of my shared
folders, although at this point I can't access them.
weinerdogus
2006-01-28, 03:57 PM CST
system-config-samba
you need to allow access to your shares
click on one of your shares, click properties, click access and select who has access to the share
hammah33
2006-01-31, 09:46 AM CST
Ok I changed the share to allow specific users to access it. Now when I'm in windows and I double click on the share, it asks me for a user name and password. When I type the username and password it says:
\\Hammerl\WDC_USB2 is not accessable.
The Network name cannot be found
paperdiesel
2006-01-31, 11:14 AM CST
Ok, in tinkering a bit more, I figured it out. My /etc/hosts file now looks like this:
127.0.0.1 hammerl.localdomain hammerl
172.16.0.23 HammaLinux
This is dangerous. You need to leave that first line alone, or else some of your programs are going to start acting weird. Try this instead:
127.0.0.1 localhost.localdomain localhost
172.16.0.23 HammaLinux.mydomain.com HammaLinux
The "mydomain.com" part can be made up. You just need something to indentify yourself.
pd
Firewing1
2006-01-31, 04:37 PM CST
Or, even simpler:
127.0.0.1 DellLin.localdomain DellLin localhost.localdomain localhost
This is my /etc/hosts file. This tells Fedora to use either of: DellLin or localhost. My hostname is set to DellLin.localdomain, you can configure this in the /etc/sysconfig/network file.
HOSTNAME=DellLin.localdomain
That line controls it. Once you have the server set up OK, (after the hostname change), you can access the server by //hostname without the .localdomain. In my case, it's
//DELLLIN
Firewing1
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.