LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 08-03-2010, 04:13 PM   #1
ismism
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Rep: Reputation: 0
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
 
Old 08-03-2010, 04:51 PM   #2
indelible
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Rep: Reputation: 2
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.

Michael
 
Old 08-03-2010, 08:34 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,013

Rep: Reputation: 1356Reputation: 1356Reputation: 1356Reputation: 1356Reputation: 1356Reputation: 1356Reputation: 1356Reputation: 1356Reputation: 1356Reputation: 1356
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.
 
Old 08-04-2010, 03:27 PM   #4
ismism
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 08-04-2010, 03:34 PM   #5
hanishmadan
LQ Newbie
 
Registered: Jan 2010
Posts: 8

Rep: Reputation: 0
can you check iptables setting on centos and windows as well??
 
Old 08-04-2010, 03:44 PM   #6
ismism
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.

Last edited by ismism; 08-04-2010 at 03:47 PM.
 
Old 08-04-2010, 03:52 PM   #7
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
ismism -

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.

SUGGESTIONS:
4. Please look at this link, and upgrade to Samba 3 if necessary:
https://www.centos.org/modules/newbb...22732&forum=37

5. Also look at this link, and apply the Win7 registry edits if necessary:
http://social.technet.microsoft.com/...1-346912f4def6
Code:
[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
'Hope that helps .. PSM

Last edited by paulsm4; 08-04-2010 at 03:56 PM.
 
Old 08-04-2010, 04:09 PM   #8
hanishmadan
LQ Newbie
 
Registered: Jan 2010
Posts: 8

Rep: Reputation: 0
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.
 
Old 08-04-2010, 11:24 PM   #9
ismism
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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?
 
Old 08-07-2010, 02:34 PM   #10
ismism
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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

Any more suggestions?
 
Old 08-08-2010, 03:34 PM   #11
ismism
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
centos, virtualbox, windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't kickstart CentOs on VirtualBox VM geek.ksa Linux - Virtualization and Cloud 3 08-29-2010 09:35 AM
[SOLVED] Samba setup - Windows 7 host, CentOS Machine using VirtualBox twaddlac Linux - Server 1 07-15-2010 01:11 PM
[SOLVED] Samba setup - Windows 7 host, CentOS Machine using VirtualBox twaddlac Linux - Networking 2 06-23-2010 03:09 PM
Unable to access Samba share on CentOS 5.4 from windows XP or Vista kphannan Linux - Server 5 01-26-2010 09:08 AM
CentOS /Samba server- XP Windows client file sharing issue 3phoenix Linux - Server 7 11-06-2009 11:05 AM


All times are GMT -5. The time now is 04:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration