CentOS in one VirtualBox, Windows in another - can I set up Samba in the CentOS VB?
I've got CentOS running in one VirtualBox machine and Windows 7 in another(on a Mac running Snow Leopard). I'm trying to set up Samba on the CentOS VB so that I can see the share from the Windows VB. I've got The Definitive Guide to CentOS and have followed the instructions there, but to no avail. I can ping both ways, so it would seem that it is possible. There are numerous HOWTOs out there, all very different. Any suggestions for one that works? I know it can be done because I tried it using the Turnkey Linux Samba package, but I'd like to do it from scratch so I can learn something.
That's a pretty open question - if you could give more specific detail where you're running into difficulty, it would be easier to help!
Things to check:
* how you're trying to connect to the windows machine makes a difference - if you're using the hostname (not the IP) then you'll need to set up winbind.
* the firewall/security/sharing settings on Windows 7 (it's a pretty common mistake to forget about this)
Other than that, give more info and I'll try to get back to you.
It would be as if you are setting up samba between any real computers at this point. The only deal would be if you are somehow using public IP addresses. That would mess up samba. Might be easier to test with ftp but ports and firewalls are basically similar. You also have to know how W7 does samba too.
Thanks for the offers of help! Gosh, I'm really lost. I don't know what additional information would be helpful. The instructions in The Definitive Guide to CentOS don't work for me, but I suspect that's because they were written under the assumption that Windows XP would be used and I'm using Windows 7 Professional. I looked in the firewall settings for Win 7 and am rather (OK, totally) befuddled. I enabled File and Printer Sharing (SMB) for Private and Public profiles (not Domain) for both Outbound and Inbound and that didn't seem to have any effect (would I need to restart?). One thing that seems a little screwy is that on the CentOS VB on which the Samba share is set up, the IP address is 192.168.56.101, but in the Windows 7 VB it's 10.0.2.15, so maybe the Windows VB is on the wrong subnet? I can ping the CentOS VB from the Windows VB, but not the reverse. It seems like there must be something I need to do on the Windows side, but I'll be damned if I can figure out what.
TIA for any help.
can you check iptables setting on centos and windows as well??
I don't even know how to check iptables. I've heard of them, and that's about the extent of my experience. Sorry, I'm a total noob.
1. Yes, you can run CentOS in a virtual box and use Samba shares with it.
2. There are lots of things that can go wrong, however. Not just with Linux - but with Windows network file sharing in general. *Especially* with Windows 7.
3. "iptables" is just a firewall: the Linux equivalent of Windows firewall.
4. Please look at this link, and upgrade to Samba 3 if necessary:
5. Also look at this link, and apply the Win7 registry edits if necessary:
I hope above with help. but if still want to stop firewall: -
no one is noob.. if you are not confident with iptables just stop the service. do below: -
chkconfig iptables off
services iptables stop
on the windows machine stop the firewall service. just open the services screen by giving services.msc in run and look for windows firewall and stop the service.
then try out to access the samba drive.
Thank you all for your support! I've been following these instructions: http://www.badministrateur.com/en/node/31 and it seems to be going well (got Samba 3.3.7(?)) installed, but haven't had a chance to test it, yet. I think I'll just turn off the firewall in Windows for now. Next step will probably be to install the Turnkey Linux File Manager virtual appliance and examine the results. This is for a school project, so it's not terribly critical; I just need to demonstrate that I've learned something. One thing I've learned so far is that this site is a great resource!! Group hug? Hey! Where's everyone going?
Seems like I'm almost there - I can see my Samba share in Win 7, but when I try to access it through Windows Explorer, I get:
Error code 0x80070043
The network name cannot be found.
I've created all of the registry entries above, installed Samba 3.3.7, set the shared directory's (/home/samba) permissions to 755, chown'd it to daniel:daniel just for the heck of it, set a password for daniel using smbpasswd, and have the following entries in my /etc/samba/smb.conf file:
workgroup = MYGROUP ; same on the Windows box
server string = Samba Server
log file = /usr/local/samba/var/log.%m
max log size = 50
dns proxy = No
comment = Home Directories
read only = No
browseable = No ; should this be Yes?
; don't have a printer
comment = Public Stuff
path = /home/samba
write list = @staff, test1, daniel
read only = No
guest ok = Yes
Any more suggestions?
I decided to give up on Windows 7 and am giving it another go with Windows XP SP 2, since that's what the CentOS book I'm working with uses. Film at eleven.
|All times are GMT -5. The time now is 06:41 AM.|