RHEL 6 for the Clueless: Samba File Sharing

By Ed Ed | Posted at 1:53

In my explorations with RHEL 6, we have come a long way towards a useful computing environment. One piece we have not taken time to explore much, however, is one of the most important for many users: file sharing. If you intend using your RHEL machine to serve files amongst Windows machines, one of the first things you should consider is using Samba.

This is the Open Source implementation of Windows' SMB. Samba allows your RHEL box to provide a compatibility layer so a Windows computer on the same network, such as your home LAN, can read portions of the Linux file system natively. It is also the only way I know you can have Linux operate as a print server for Windows sharing. That is, if you have a printer connected to your RHEL box and working, Samba allows you to provide a Windows computer access, provided that Windows box has its own driver for it.

There seems to be no documentation from Red Hat, and Samba itself offers a huge documentation library because there are too many options for any sane person to examine. There are some items you'll need to prepare before starting: username (so the Windows user can login from their machine), password, and the network IP address on your LAN for the other computer(s), and a shared directory with world write permissions. If a printer is involved, make sure it's setup to share.

RHEL provides a GUI tool for printer setup. If your printer is connected via USB, it should be recognized immediately if RHEL knows what it is. This is the place to check. There isn't space here to chase down all the various problems you might encounter, so if it doesn't pretty much work, and you can't get it recognized and configured through the Administration menu, you'll need to engage your favorite search engine using your printer model with the keyword "linux" or terms like "RHEL" and "Fedora," and make the most of it. In the menu system for the printer configuration tool is a place to checkmark some boxes to share the printer.

I've found a couple of tutorials on Samba, but neither one had all the right information. After fighting with it a bit, this is what I did to get it working.

Install Samba by logging into a Terminal as root:

yum install samba

Create shared directory; I used /home/shared using the following commands:

mkdir /home/shared
chmod a+w /home/shared
chcon -t samba_share_t /home/shared

That last line insures the SELinux security system knows to allow outside systems to poke around in that folder. Now anyone using this computer can move files in and out of the folder, as well as the Samba users.

Add a Samba user. This is a different task than simply adding a user account. There is a GUI tool for adding Linux user accounts to the machine for them to use the computer itself. However, Samba users must be handled differently, so that the system forces them to use the Samba server.

useradd -c "Real Name" -d /home/samba-username -s /sbin/nologin samba-username

That's all one line. As usual, substitute the actual Real Name and username in the command above. Then create the Samba password. Remember what we said about coming up with good passwords:

smbpasswd -a samba-username

It will prompt for the password, which you type in blindly:

New SMB password:
Retype new SMB password:
Added user username.

Edit smbusers:

gedit /etc/samba/smbusers

This will open the default text editor. Scan down the file until you see something like this:

root = administrator admin nobody = guest pcguest smbguest

Immediately below this, add a line with this format:

username = samba-username

so RHEL recognizes the person logging in from the Winbox by their samba-username. Close this file by saving it, then open a file in the same place: /etc/samba/lmhosts. The first line should show: 127.0.0.1 localhost. Add another line below that: 192.168.1.102 hostname.

That is, the IP address on your network of the Windows box, and it's hostname in lower case. If you don't know how to find the IP address on Windows, use these instructions. To get the hostname, try this page from the same site. Save that file.

Then open: /etc/samba/smb.conf. Find the section headed [global]. Change the workgroup name to whatever your Windows computer will be seeking. Default is workgroup in lower case letters. You値l need to remove the semicolon in front of the next line and provide a proper hostname for the netbios name, which would be the name you gave your RHEL computer during installation, again in lower case. Remove the semicolon from the next line and the IP address numbers from the sample; all we need are the two interfaces lo eth0. Below that is a line with hostsallow as a model. Below that, start a new line with the same indentation:

hosts allow = 127. 192.168.1.

The "127." is the IP address for everything on your own machine. The other (192.168.1.) is the private LAN network I use for my home router; by leaving off the last section after the dot, it automatically includes every computer with that prefix, which is reserved for LANs.

Go all the way to the bottom of the file and add some lines. I named my shared directory "shared." Thus, the section heading should be named the same:

[shared]
path = /home/shared
writeable = yes
browseable = yes
read only = No
guest ok = Yes
public = Yes
create mask = 0666
directory mask = 0777

Now change the firewall to allow Samba to get through. You can use the tool in System > Administration > Firewall. Simply scan down the list to Samba and checkmark the box. Optionally checkmark IPP printer sharing. Then hit "Apply." Now we start the service manually; it's actually two services:

/sbin/service smb start
/sbin/service nmb start

Test whether your Windows box can find the server. In Win7 and Vista, that's via your file manager window. On the left hand side look for the Network icon. Double click to open and the computer should search for other machines. Your RHEL box should eventually show up by it's hostname. Double click and see if you can login from there. If successful, your shared folder and any printer you've permitted will also show.

For XP and Win2K, it's a similar idea using the file manager. The simplest way is to right-click on "My Computer" and select "Explore" so that the left pane shows the various drives, and should display a network connection to the RHEL server.

If it works and you don't have to cry for help, you'll want to make it a normal service always running. System > Administration > Services -- find "nmb" and "smb" and click the "Enable" button. From now on, upon boot the system will start the two services automatically.

Ed Hurst is Associate Editor of Open for Business.


Re: RHEL 6 for the Clueless: Samba File Sharing

thanks, this worked flawlessly on CentOS 6.2

Posted by fabio - Feb 2, 2012 | 13:54

Re: RHEL 6 for the Clueless: Samba File Sharing

Everything worked - However, there is a problem with the shared directory (not the /home/user directory). I created a group (sambagrp) and added the authorized uses. However, the user cannot create a file or directory in the shared directory unless chown is ran on the directory to replace root with the user (drwxr-xr-x 2 root sambagrp 4096 Jun 10 20:22 sharedir). Is their anyway to make the share directory accessible to any authorized user without having to execute “chown [user] sharedir”?

Posted by Mike - Jun 11, 2012 | 1:54

Re: RHEL 6 for the Clueless: Samba File Sharing

Mike, I don't know of any way around that. Then again, I'm just a duffer who poked and prodded until I got it to work. I'm sure a real technician would have a better answer.

Posted by Ed Hurst - Jun 13, 2012 | 2:04

Re: RHEL 6 for the Clueless: Samba File Sharing

Has something been changed with the implementation of Windows 10? I want guys to make my thesis on the safest way of sharing files in computing environment. Regular cloud storage doesn't look safe from my perspective.

Posted by Noah - Nov 23, 2016 | 8:31

Re: RHEL 6 for the Clueless: Samba File Sharing

The samba (document sharing) subsystem on Ubuntu utilizes diverse login certifications than the standard login. explainer video pricing. What you have to do is utilize the program “smbpasswd” to include/change your samba (record sharing) secret word.

Posted by Celine Isai - Jan 19, 2017 | 6:29

Re: RHEL 6 for the Clueless: Samba File Sharing

New release of Samba has helped users to share their data in quick possible time, file is divided in different parts at same time. Suppose if you are a writer and working for custom writing service then you would be pleased to know when you find quality article from where you get information.

Posted by patris - Jan 23, 2017 | 20:27

Re: RHEL 6 for the Clueless: Samba File Sharing

This is the website that i had been always looking for when i need the gta money and rp and it is always a lot helpful.

Posted by gta 5 online money generator - Jan 30, 2017 | 5:59

Re: RHEL 6 for the Clueless: Samba File Sharing

Thanks for the steam wallet The key are equally important steam wallet codes.

Posted by free steam gift cards - Feb 13, 2017 | 1:40

Re: RHEL 6 for the Clueless: Samba File Sharing

RHEL provides a lot of useful features other than those provided within the similar applications. This is a nice tool to have which provides a very useful computing environment. I think this latest tool will provide a lot of assistance to the professionals.

Posted by manufactured homes prices - Feb 25, 2017 | 8:29

Re: RHEL 6 for the Clueless: Samba File Sharing

Thanks for this article. Great work. Good effort to complete this. Brilliant.

Posted by Buy Original Research Papers - Mar 10, 2017 | 18:55

Re: RHEL 6 for the Clueless: Samba File Sharing

Thanks for this great article. Very helpful. Providing a great help to get a bright future for the present generation. Great work.

Posted by Research Paper Writing - Mar 11, 2017 | 3:46

Re: RHEL 6 for the Clueless: Samba File Sharing

Microsoft outlook is one the emailing services and millions of people over the world use this to complete emailing requirements. But, technical issues are not avoidable of this service such as emails take too long to go or login issue. At this time you should talk to the technicians of Outlook Contact Number UK. They will give you the straight resolution of issue that you face within a couple of minutes that you need.

Posted by Rose Bronwen - Mar 20, 2017 | 10:19

Re: RHEL 6 for the Clueless: Samba File Sharing

I like this a lot. Thank you for sharing. I’m always looking for upcycles like this. In the end, you don’t know it was a shipping pallet to begin with!

Posted by happy wheels - Mar 23, 2017 | 8:34

Re: RHEL 6 for the Clueless: Samba File Sharing
Posted by ramukaka123 - Mar 25, 2017 | 11:07

Re: RHEL 6 for the Clueless: Samba File Sharing

I have gone through your post and came to know about Samba file sharing. I would like to know more on this topic. Hope you will update more information as soon as possible. I am eagerly waiting for your updated post to get more details. jewish wedding planner

Posted by Alitta - Mar 30, 2017 | 12:07

Re: RHEL 6 for the Clueless: Samba File Sharing

Actually, this is the first time I am hearing about Samba file sharing. After reading this article I got interested to read more about this. If possible kindly include more details as soon as possible. Thanks for share this.Wholesale Tablet

Posted by manuel abraham - Mar 31, 2017 | 11:51

Re: RHEL 6 for the Clueless: Samba File Sharing


This replica rolex special carving tells people that replica watches part of the sales proceeds of this watch will be donated to the Foundation to support the social events of the replica watches uk Lawrence Sports Foundation.

Posted by replica watches - Apr 2, 2017 | 8:36

Re: RHEL 6 for the Clueless: Samba File Sharing

No longer was playing poker and spinning the slots reserved for retirees and other affluent people, now the young kids were able to get a shot at all the best action and since then there has been no looking back as the gambling industry is as big as its ever been.
Casino blog

Posted by asd - Apr 12, 2017 | 11:36

Re: RHEL 6 for the Clueless: Samba File Sharing

I'm new in this sphere. Everything connected with it is interesting for me. Your information is very helpful:)

Posted by this link - Apr 13, 2017 | 11:10

May 2017 Calendar Template

You can see more format of calendar so visit this website.
May 2017 Calendar Template

Posted by Anonymous - Apr 19, 2017 | 7:32

June 2017 Calendar Template

There are many calendar format at our website. So please click this website.
June 2017 Calendar Template

Posted by Anonymous - Apr 19, 2017 | 7:33

Re: RHEL 6 for the Clueless: Samba File Sharing

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!

Posted by cupom oakley - Apr 26, 2017 | 11:07

Adobe help Number UK 0808-178-2624

Hey, such a amazing post.

Posted by Adobe help Number UK - Apr 27, 2017 | 7:05

Re: RHEL 6 for the Clueless: Samba File Sharing

it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity..

Posted by ciamaritima - Apr 27, 2017 | 11:27

Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people..

Posted by Made in Italy clothes - May 1, 2017 | 1:51

Re: RHEL 6 for the Clueless: Samba File Sharing

Testimonial ASLI Dari yang Sudah Order Potenzol ASLI!!

Berikut kiriman testimonal ASLI dari yang SUDAH MEMESAN OBAT PERANGSANG WANITA POTENZOL DI WEBSITE KAMI, testi asli milik kita sendiri, nomor hp kami sensor untuk menjaga privasi para pemesan, kami tambahkan signature “www.potenzol.com” milik kami sendiri untuk menghindari foto testi kami dicopas oleh web lain yang tidak punya reputasi.

DISCLAIMER :
?obat tahan lama viagra

Hasil penggunaan obat perangsang wanita Potenzol berbeda-beda kepada wanita idaman Anda, kami sangat menyarankan agar menggunakan Potenzol kepada pasangan sendiri sehingga lebih terlihat perbedaan hasilnya saat Anda melakukan hubungan seksual dengan pasangan Anda. Obat perangsang wanita

Posted by Perangsang Wanita - May 2, 2017 | 8:42

Re: RHEL 6 for the Clueless: Samba File Sharing

It’s About Luck: One enormous mistake that people tend to make when they are gambling in a bitcoin casino is that they tend to think that skill matters a lot more than it actually does. In truth, skill is not as important as luck, not by a longshot.
BTC casino

Posted by asd - May 4, 2017 | 9:31

Re: RHEL 6 for the Clueless: Samba File Sharing

hi there
In February 2003, in a suburb of Manchester in the UK, a 16-year-old boy named Mark met a beautiful teenage girl called Rachel in an MSN chatroom dedicated to Manchester teens. Mark quickly became obsessed with 16-year-old Rachel despite the fact that he had never met her in person or even seen her on webcam, all he had was one photo of her that she had shared online. Rachel and Mark eventually began a cyber relationship and (in the chatroom)
Norton Support Number

Posted by nock jones - May 8, 2017 | 10:57

Re: RHEL 6 for the Clueless: Samba File Sharing
Posted by patricks117 - May 8, 2017 | 17:14

jangkrik

This is great, you are good, i like your post and i still waiting our next post
Bandar Ceme

Posted by Jangkrik mewah - May 9, 2017 | 5:16

Re: RHEL 6 for the Clueless: Samba File Sharing

Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people..

Posted by Best Jvzoo Review Site - May 11, 2017 | 9:39

Re: RHEL 6 for the Clueless: Samba File Sharing

good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for her
good morning quotes for girlfriend
good morning quotes for girlfriend
good morning quotes for girlfriend
good morning quotes for girlfriend
good morning quotes for girlfriend
good morning quotes for girlfriend
good morning quotes for girlfriend
good morning quotes for girlfriend
good morning quotes for him
good morning quotes for him
good morning quotes for him
good morning quotes for him
good morning quotes for him
good morning quotes for him
good morning quotes for him
good morning quotes for him
good morning quotes for friends
good morning quotes for friends
good morning quotes for friends
good morning quotes for friends
good morning quotes for friends
good morning quotes for friends
good morning quotes for friends
good morning quotes for friends
good morning quotes for friends
good morning quotes for boyfriend
good morning quotes for boyfriend
good morning quotes for boyfriend
good morning quotes for boyfriend
good morning quotes for boyfriend
good morning quotes for boyfriend
good morning quotes for boyfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for girlfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for boyfriend
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for friends
happy birthday wishes for her
happy birthday wishes for her
happy birthday wishes for her
happy birthday wishes for her
happy birthday wishes for him
happy birthday wishes for him
happy birthday wishes for him
happy birthday wishes for him
happy birthday wishes for him

houston medical center
houston medical center
houston medical center
houston medical center
houston medical center
houston hospitals
houston hospitals
houston hospitals
houston hospitals
houston hospitals
new york hospital
new york hospital
new york hospital
new york hospital
new york hospital
chicago hospitals
chicago hospitals
chicago hospitals
chicago hospitals
chicago hospitals
chicago hospitals
chicago hospitals
chicago hospitals
chicago hospitals
boston hospitals
boston hospitals
boston hospitals
boston hospitals
boston hospitals
boston hospitals
boston hospitals
boston hospitals
boston hospitals
boston hospitals
austin hospitals
austin hospitals
austin hospitals
austin hospitals
austin hospitals
austin hospitals
austin hospitals
austin hospitals
austin hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
seattle hospitals
hospitals in philadelphia
hospitals in philadelphia
hospitals in philadelphia
hospitals in philadelphia
hospitals in philadelphia
phoenix hospitals
phoenix hospitals
phoenix hospitals
phoenix hospitals
phoenix hospitals
phoenix hospitals
hospital los angeles
hospital los angeles
hospital los angeles
hospital los angeles
hospital los angeles
hospital los angeles
detroit hospitals
detroit hospitals
detroit hospitals
detroit hospitals
detroit hospitals
detroit hospitals
portland hospital
portland hospital
portland hospital
portland hospital
portland hospital
portland hospital
portland hospital
washington dc hospitals
washington dc hospitals
washington dc hospitals
washington dc hospitals
charlotte hospitals
charlotte hospitals
charlotte hospitals
charlotte hospitals
charlotte hospitals

Posted by nikhil sharma - May 12, 2017 | 5:54

Dominoqiu

Absolutely really Amazing Articel and good point in there.
Thanks shared.
Dominoqiu

Posted by Dominoqiu - May 12, 2017 | 22:55

Dominoqiu

Absolutely really Amazing Articel and good point in there.
Thanks shared.
Dominoqiu

Posted by Dominoqiu - May 12, 2017 | 22:55

Posted by Lexmark Printer Support - May 15, 2017 | 10:55

Re: RHEL 6 for the Clueless: Samba File Sharing

Sent from ProfitMozo Review
Sent from Best Jvzoo Reviews
And even bigger problem is…
If someone is not tech savvy then it can cost hundreds of dollar in creating a good landing page.
But even if, we get nice marketing pages ready by outsourcing to expensive freelancers then also it’s of no use until we get huge traffic on them.
So, I’m today to introduce you the new software which can help you to solve these 2 big problems called: ProfitMozo . Keep reading

Posted by Anonymous - May 17, 2017 | 14:16

mayazoe

I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work.
free credit report gov

Posted by maya zoe - May 20, 2017 | 10:22

Re: RHEL 6 for the Clueless: Samba File Sharing


Hi admin, the information you provide is very cool and also add to my knowledge, thanks
Obat Difteri

Posted by Apotek Online - May 23, 2017 | 6:21

Re: RHEL 6 for the Clueless: Samba File Sharing

Thanks for your post! I believe there are many who feel the same satisfaction as I read this article! I hope you will continue to have such articles to share with everyone!
fb login

Posted by slither io - May 25, 2017 | 11:30

mayazoe

Hey – great blog, just looking around some blogs, seems a really nice platform you are using. I’m currently using WordPress for a few of my blogs but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?
free gift card

Posted by maya zoe - May 27, 2017 | 7:15

Please enter your comment entry below. Press 'Preview' to see how it will look.

Name:
Sign In to Your Account
User Name:
Password:
Location:
Homepage:
E-mail:
Subject:
:mrgreen: :neutral: :twisted: :arrow: :shock: :smile: :???: :cool: :evil: :grin: :idea: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: :!: :?:
Home About Connect: Twitter Facebook RSS
© 2001-2012 Universal Networks, All Rights Reserved. Some content rights may be held by Universal Networks' providers and used under license. Powered by ServerForest and SAFARI. Learn about our privacy policy here.