CentOS in one VirtualBox, Windows in another - can I set up Samba in the CentOS VB?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
Last edited by ismism; 08-03-2010 at 04:30 PM.
Reason: Additional info
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.
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.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters]
; Enable NT-Domain compatibility mode
; Default:
; [value not present]
; "DomainCompatibilityMode"=-
"DomainCompatibilityMode"=dword:00000001
; Disable required DNS name resolution
; Default:
; [value not present]
; "DNSNameResolutionRequired"=-
"DNSNameResolutionRequired"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters]
; Disable requirement of signed communication
; My Samba (3.0.33) works with signed communication enabled, so no need to disable it.
; Default:
; "RequireSignOrSeal"=dword:00000001
; Disable the usage of strong keys
; Default:
; "RequireStrongKey"=dword:00000001
"RequireStrongKey"=dword:00000000
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.
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:
[global]
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
[home]
comment = Home Directories
read only = No
browseable = No ; should this be Yes?
[printers]
; don't have a printer
[public]
comment = Public Stuff
path = /home/samba
write list = @staff, test1, daniel
read only = No
guest ok = Yes
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.