LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-26-2009, 09:25 PM   #1
th_matt
LQ Newbie
 
Registered: Nov 2009
Posts: 9

Rep: Reputation: 0
Thumbs up How to share directories between RedHat and Vista?


Background:
I do not know about a lot about linux. I’m only a beginner and am hoping to learn by posting questions here. I have a Vista Machine and using VMWare Workstation 7.0, virtualized Red Hat 5.4. Therefore I'd appreciate and additional details that are given to my questions.

Awesome Thanks!!!

Question:
How do I access my shared Vista directories in RedHat. Is this possible?
Or even vice versa, how do I share directories in RedHat that can be accessed in vista.
When I say access, I am looking for both read/write permissions.

Additional Details:
My RedHat hostname is localhost.localhostdomain. This is by default.
 
Old 11-27-2009, 08:10 PM   #2
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
give Samba a try
 
1 members found this post helpful.
Old 11-28-2009, 04:54 AM   #3
imagine_me2
Member
 
Registered: Nov 2009
Location: Kolkata, India
Distribution: Fedora 11
Posts: 136

Rep: Reputation: 22
All you need to configure your VMware virtual network interface to connect your host(Windows Vista) and guest(RHEL) os.

After that you can settle down for simple command line ftp or a use a ftp client. Or you can try and use Samba.
For that purpose you have to configure and start Samba server in RHEL.

Regards.
 
Old 12-06-2009, 12:21 AM   #4
th_matt
LQ Newbie
 
Registered: Nov 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Please let me know how to configure and start samba server in RHEL. As explained earlier, the more detailed the steps, the better.

Any links which explain (in simple terms) how to perform this will also do.

Thanks.
 
Old 12-06-2009, 01:08 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello and Welcome to LinuxQuestions,

Google is your friend in all your quests. Have a look at these:

I help you
Guide from RedHat
Yet another one

Kind regards,

Eric
 
1 members found this post helpful.
Old 12-06-2009, 02:57 AM   #6
th_matt
LQ Newbie
 
Registered: Nov 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks Eric.

The first link was funny (and a good tool). I tried that before and it had got be to the second link which I got stuck following. Mainly I get an error when I type this into terminal. 'redhat-config-samba'. Like I said, I'm a real newbie.

But the thrid link looks like its got the right amount of detail and its exactly what I need. Thanks dude.

If anyone one else has anymore links/suggestions. Please feel free to post here. Like I said the simpler more detailed, the better.
 
Old 12-06-2009, 03:14 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Glad you liked it! Have a look at this site too: http://www.howtoforge.com. If you type Samba in the search box and look at the CentOS guide, you'll get a pretty good idea of how to set it up. CentOS is very similar to RedHat. All the guides on that site are step by step/copy and paste, so that should be the easiest you're going to get other than having someone experienced sitting next to you.

Kind regards,

Eric
 
1 members found this post helpful.
Old 12-06-2009, 06:37 AM   #8
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
Please let me know how to configure and start samba server in RHEL. As explained earlier, the more detailed the steps, the better.
th_matt,

Actually there is no better and easier way in learning Samba or other unix networking than through reading a well written tutorial. You can download a good Samba Tutorial here.

Hope it helps. Good luck.
 
1 members found this post helpful.
Old 12-06-2009, 08:18 AM   #9
Kenzor
LQ Newbie
 
Registered: Nov 2009
Distribution: Mandriva
Posts: 4

Rep: Reputation: 2
I recently set up a samba server myself for a college assignment on a CentOS system, which is a clone of RedHat, and I documented my steps, I'll share them with you.

1) install samba and set it to start automatically after every reboot
# yum install samba
# chkconfig --level 2345 smb on


2) open up the appropriate ports in the firewall

# iptables -I INPUT 1 -p udp --dport 137 -j ACCEPT
# iptables -I INPUT 1 -p udp --dport 138 -j ACCEPT
# iptables -I INPUT 1 -p tcp --dport 139 -j ACCEPT
# iptables -I INPUT 1 -p tcp --dport 445 -j ACCEPT
# iptables -I INPUT 1 -p udp --dport 445 -j ACCEPT
# service iptables save
# service iptables restart


Why so many ports? The smb protocol depends on a lot of stuff, including Netbios, which is Microsoft's way of tying computer names to an IP address.

3) the /etc/samba/smb.conf configuration file
The assignment required I shared 2 folders, one read-only, and one with writing permissions.
I also had to secure the /shares/Public/upload folder so only the user "student" could access and write in it.
If you want to use password authentication too, you have to add a user to samba (substitute student with your user name):

#smbpasswd –a student


Code:
# vi /etc/samba/smb.conf
	#======================= Global Settings======================
	[global]
		workgroup = MYGROUP
		server string = Samba Server Version %v
		netbios name = NAS
		hosts allow = 127. 10. 168.
		security = user
		passdb backend = tdbsam
	#====================== Share Definitions =====================
	[Public]
		comment = Public
		path = /shares/Public
		public = yes
		guest ok = yes
		writable = no
		printable = no
	[upload]
		comment = upload
		path = /shares/Public/upload
		public = yes
		guest ok = no
		writable = yes
		printable = no
		valid users = student
The lines "security = user" and "passdb backend = tdbsam" make sure you need to log in with a valid user account to access the share.
The line "valid users = student" makes it so only student can access that particular share.

4) SELinux settings
This is emportant, RedHat systems use Security Enhanced Linux, and it won't just let samba share folders without direct orders from root.
(make sure to replace the "/shares" part with the folder you want to share)
# semanage fcontext -a -t samba_share_t "/shares(/.*)?"
# setsebool -P samba_export_all_rw on


5) accessing the shares
Start up the samba service (we set it up to start after a system reboot in step 1, but it's not actually running yet right now).
# service smb start

point your windows explorer to \\ipaddressofyourlinuxserver

You should see a folder for every share definition you made, in my example, a folder called Public and one called upload, even though in reality upload is inside Public.


I think I have provided you with a complete but minimal list of things to do to get samba working, I hope it helps.

Good luck!

Last edited by Kenzor; 12-06-2009 at 08:20 AM.
 
1 members found this post helpful.
  


Reply


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
Hidden Directories in Vista vxc69 General 7 07-11-2008 01:38 PM
Cannot share directories in 2006 RC2 KurtMStraker Mandriva 7 11-30-2005 03:24 AM
Newbie: The best way to share directories with MS Windows guarriman Linux - Networking 2 11-28-2004 12:12 AM
Newbie: How to share directories guarriman Linux - Networking 1 11-27-2004 08:57 AM
share directories from command line tarheel92x Linux - Networking 1 09-07-2004 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration