Setting up Samba
I've been trying to set up a samba server on my RH 9.0 box (dualboot with Win XP Pro) but with no luck so far. first thing I did was reconfigure /etc/samba/sbm.conf and this is the result
[global] netbios name = SERVERNAME server string = "Samba Server" workgroup = WORKGROUP security = user log file = /var/log/samba.log socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 encrypt passwords = yes wins support = yes [<username>] path = /home/<username> guest ok = yes valid users = <username> writeable = yes I encrypt the samba password for the user with command smbpasswd -a <username> I start the samba server through a modification of xinetd, i.e. (I add the following to xinetd) service netbios-ns { socket_type = dgram protocol = udp wait = yes user = root group = root server = /bin/nmbd } service netbios-ssn { socket_type = stream protocol = tcp wait = no user = root group = root server = /bin/smbd } then I restart RH 9.0 after that I log into win xp and map the drive and the massage that \\server\<username> cannot be found. What am I doing wrong, it's driving me crazy the least. I used the Unofficial guide to samba from the www.samba.org page. What am I missing is it the fact my security level in linux is to high and doesn't allow the connection? Kind Regards André :eek: :confused: |
Read this book instead, doesn't take to long and I promise you will have a working samba setup
http://www.oreilly.com/catalog/samba/chapter/book/ |
Can you ping the server from the host and vice versa?
In other words, make sure your NICs are set up correctly and your network is running before you even think about Samba. |
Thanks for the link and the swift replies. I did what it said on the link side and I tested the Samba server with
smbclient -U% -L localhost and it found it, now pinged it under linux also and it found of course but under windows it can find the server. I can't figure what is wrong, is it linux that doesn't allow the incoming connection? Regards André Fettouhi |
Redhat 9 firewall blocks Samba by default IF you have the firewall running. Not sure if you have a firewall running at all but its worth checking.
If needed: One way to allow Samba to get through is to use Lokkit. /usr/sbin/lokkit on mine On the lokkit interface under 'other ports', allow the following 137:UDP 138:UDP 139:TCP I have seen in some posts that 445:TCP also needs to be allowed for some versions of Samba but I did not allow 445 on mine. I think the 137 and 138 ports are used for NMBD and the port 139 is for SMBD. |
Another thing that might make configuration easier is to use ntsysv to set up xinetd if you had not already thought of it.
If needed: /usr/sbin/ntsysv on my machine You can just check off the "smb" box and it will auto start both smbd and nmbd once you restart xinetd. To restart xinetd: /etc/rc.d/init.d/xinetd restart |
Again many thanks for all your suggestions I've tried them but the result is still the same. Win XP can't connect to the server when Itry to map the drive. Pinging fails also still, I've shut the firewall of in RH 9.0 and still no change that means something is configured wrong. My internet connection is a DHCP connection so I get all the info from an external server except the DNS those I had to type in RH but und Win XP doesn't need them. Those anyone have an idea.
Kind Regards André Fettouhi |
If pinging fails, then it's not Samba. It's something else.
Concentrate on getting your pings through - it's what fixed a similar problem for me. My firewall was blocking the connection between my masqed network and the firewall PC. If RedHat uses something like Shorewall (ie like in Mandrake), you can turn it off but it still can get in the way. Check your NICs are configured properly. You can turn off Samba all together and you should still be able to ping each machine in the network, which will save you messing about with samba when that's not the problem. Good Luck |
How I check if my NICs are configured properly?
Regards André Fettouhi |
I know this might sound dumb - but is your network up when you use XP? Snafu'd cables are a real common problem (at least in my house, the missus keeps vacuum cleaning them :D)
have you run netconf or netconfig from a console (as root)? I have Mandrake 9.1, and the GUI setup wouldn't configure my cards properly so I had to resort to the good old fashioned console commands. Are you using DHCP or static IP address assignment? For small networks (and noobs like me) I found DHCP to be a pain in the butt, and if you have only three or four PCs it's no real trouble to remember (or write down) the static IP of each machine. It really is simpler. Make sure all your machines are using the same protocol. Happy Tinkering, Matt |
From your first post i perceived that you tried to see your linux directories using samba from your win xp, and that, infact, they both reside on the same machine. Am i right? Im sorry if im wrong, but just in case if its true,...as far as i know windows can't read a unix file system directly.
Kind Regards levian |
Levian - That's what Samba does. It allows Windows and Linux to network, share files and folders, even printers. I can't believe how cool it is. :)
fettouhi - I've just had a thought. I think you might be running two different protocols. if your red hat protocol was DHCP, surely you wouldn't have to provide it with the DNS addresses - DHCP does that automatically, doesn't it? to use DHCP protocols on my mandrake machine, I have to run netconfig *and not specify my IP address*. If I want Static IP addresses, then I enter them in netconfig. Can't tell you about RedHat, tho I'm afraid. |
Again many thanks. But I am bit confused now, so let me ask this simple question can I with samba share files between my linux partion and windows on the same machine or does samba only work on external machines that log in to a linux computer. I am running the same protocol on both partitions which is DHCP. This samba thing is giving me a headache.
Kind Regards André Fettouhi :mad: |
Righty ho.
To get at your files in windows from the your RedHat computer(it is dual booting, right?), you should just be able to mount the partition, and hey presto! you have access to the files on your windows partition. You could then allow other users on other machines to access this windows partition through Samba. Is that any help? sorry to confuse you. |
Hey
Samba is used to provide access to some folder (your choice) on your Linux box. The folder is shared on a network between computers which are running at the same time. The type of network is windows netbios which speaks Server Message Block (SMB). Windows 'sees' other windows boxes and samba servers using this protocol in its network neighborhood if these machine are part of the same workgroup. This book mentioned earlier by lappen really is great on explaining all this in the first few chapters http://www.oreilly.com/catalog/samba/chapter/book/ All of this means that TrashCanMan is correct. You cannot use Samba to get at the WinXP on the RH harddrive because only one partition could be booted at once. But other Win boxes on the network could 'see' a correctly configured samba partition IF the RH box was booted. Also, you could mount the WinXP partition to the RH OS by using: mount -t NTFS /dev/hdb1 /mnt/windows This assumes you have NTFS as the file system on the XP partittion and the RH box 'sees' the windows partition as hdb1. Also, you may need to create the /mnt/windows directory. RH does not have it by default but other Linuxes do. You dont have to call it 'windows'. It just seems convienent. |
All times are GMT -5. The time now is 03:48 AM. |