centos 6 file server
centos 6 file server
what is the best way to allow mac and pc clients to connect to centos 6 as a file server.
i am a linux dummy.
i have used an mac server for this but it is dying, so time to change.
please advise. we have 1.3 tb of data to migrate and share.
michael
i am a linux dummy.
i have used an mac server for this but it is dying, so time to change.
please advise. we have 1.3 tb of data to migrate and share.
michael
Re: centos 6 file server
Installing Samba seems the way to go.
-
- Posts: 21
- Joined: 2011/09/02 15:45:37
- Location: Southern California
Re: centos 6 file server
For that, you must do..... the [i]SAMBA![/i]
And of course I mean you must activate and configure samba, but if you wish, you may dance as well.
A few tips on configuring samba for CentOS 6.
If this is simply a home file server (DO NOT do this if it is an FTP, web, or any kind of server that openly connects to the internet). But if it is a home file server that only serves on the local network, then you might need to tell selinux and iptables to leave you alone so you can do your thing. On that note, for a SIMPLE samba setup, note this is for the simplest of the simple, and should only be done on an internal only network. If you do this set-up on something serving files across the domain, you are likely to have your server compromised in about 0.7 seconds.
First, see if iptables and selinux decide to leave you alone for the moment, we shall deal with them later.
First, we must edit /etc/samba/smb.conf (I use VI personally, but any command line text editor will work)
You want to add an entry like this (again, only on an internal network only, this is highly insecure otherwise):
[*share name here*]
PATH = *path to files*
GUEST OK = YES
WIDE LINKS = YES
READ ONLY = NO
BROWSEABLE = YES
Replace anything surrounded by *'s with whatever is appropriate.
Guest OK lets anyone connect (this is why it is insecure). Wide links lets you throw in symbolic links to other parts of the system if you need to later without creating a new share (also insecure). Read only = no means you can write to it. Browseable means it "broadcasts" itself so the other systems know it exists.
Then type
service smb restart
If it works, HUZZAH, all is well and you are fine. If not.....
setenforce 0
service smb restart
edit /etc/selinux/config and change "enforcing" to "permissive"
Does it work? if yes, awesome, if no....
service iptables stop
service smb restart
Does it work? Cool, go to the services menu on the gui and disable iptables (forgot how to disable it on the command line, i assume service iptables disable, but I dont know for sure).
If not, well, sorry that's all I got.
If this is too much for you. I recommend installing a more noob-friendly distro like Ubuntu.
And of course I mean you must activate and configure samba, but if you wish, you may dance as well.
A few tips on configuring samba for CentOS 6.
If this is simply a home file server (DO NOT do this if it is an FTP, web, or any kind of server that openly connects to the internet). But if it is a home file server that only serves on the local network, then you might need to tell selinux and iptables to leave you alone so you can do your thing. On that note, for a SIMPLE samba setup, note this is for the simplest of the simple, and should only be done on an internal only network. If you do this set-up on something serving files across the domain, you are likely to have your server compromised in about 0.7 seconds.
First, see if iptables and selinux decide to leave you alone for the moment, we shall deal with them later.
First, we must edit /etc/samba/smb.conf (I use VI personally, but any command line text editor will work)
You want to add an entry like this (again, only on an internal network only, this is highly insecure otherwise):
[*share name here*]
PATH = *path to files*
GUEST OK = YES
WIDE LINKS = YES
READ ONLY = NO
BROWSEABLE = YES
Replace anything surrounded by *'s with whatever is appropriate.
Guest OK lets anyone connect (this is why it is insecure). Wide links lets you throw in symbolic links to other parts of the system if you need to later without creating a new share (also insecure). Read only = no means you can write to it. Browseable means it "broadcasts" itself so the other systems know it exists.
Then type
service smb restart
If it works, HUZZAH, all is well and you are fine. If not.....
setenforce 0
service smb restart
edit /etc/selinux/config and change "enforcing" to "permissive"
Does it work? if yes, awesome, if no....
service iptables stop
service smb restart
Does it work? Cool, go to the services menu on the gui and disable iptables (forgot how to disable it on the command line, i assume service iptables disable, but I dont know for sure).
If not, well, sorry that's all I got.
If this is too much for you. I recommend installing a more noob-friendly distro like Ubuntu.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
centos 6 file server
The Samba config file has directions for use with selinux, so do not disable it.
system-config-firewall-tui will allow you to open the firewall for Samba.
system-config-firewall-tui will allow you to open the firewall for Samba.
-
- Posts: 21
- Joined: 2011/09/02 15:45:37
- Location: Southern California
Re: centos 6 file server
I was just saying for a local file server, it doesn't REALLY matter. Which is why those are disabled on mine because the DD-WRT firewall is protecting it (coincidently enough, DD-WRT is protecting it using selinux and iptables, seems a little silly to have 2 of the exact same firewall, anyone who breaks through one, is going to break through the other just as fast).
Re: centos 6 file server
followed the directions there, i now get a login window, how so i set the shared folder to allow users, i am a windows guy, so nothing looks obvious to me?
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: centos 6 file server
Selinux on the router ( which I doubt ) does not protect the server.
The server needs selinux to protect the system from people that have been able to obtain shell access.
The server needs selinux to protect the system from people that have been able to obtain shell access.
-
- Posts: 21
- Joined: 2011/09/02 15:45:37
- Location: Southern California
Re: centos 6 file server
I thought selinux was built into every 2.6 kernel?
And I suppose I very much could test out turning back on and seeing if samba is still ok with it on my own system.
Just went through my own headache with this and hoped to save a wee bit of headache from someone else.
As for winjunkie. GUEST OK = YES should have done that, but since I'm under attack at the moment for lacking security on a setup I advertised as quick dirty and insecure, we can do it the "safe" way.
Replace "guest ok = yes" with "USERS = *unix username here*"
After you do that type "smbpasswd" and then you can set up a password for samba access. Ideally this should NOT match your accounts normal password.
then as usual do the "service smb restart"
then, when you connect from windows, punch in the username and password combo you just set up, and voila!
And I suppose I very much could test out turning back on and seeing if samba is still ok with it on my own system.
Just went through my own headache with this and hoped to save a wee bit of headache from someone else.
As for winjunkie. GUEST OK = YES should have done that, but since I'm under attack at the moment for lacking security on a setup I advertised as quick dirty and insecure, we can do it the "safe" way.
Replace "guest ok = yes" with "USERS = *unix username here*"
After you do that type "smbpasswd" and then you can set up a password for samba access. Ideally this should NOT match your accounts normal password.
then as usual do the "service smb restart"
then, when you connect from windows, punch in the username and password combo you just set up, and voila!
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: centos 6 file server
[quote]
winjunkie wrote:
what is the best way to allow mac and pc clients to connect to centos 6 as a file server.
[/quote]
Others have addressed Samba and the Windows clients. I believe Mac OS-X can access windows shares but it also has native NFS support, which I would consider preferable.
winjunkie wrote:
what is the best way to allow mac and pc clients to connect to centos 6 as a file server.
[/quote]
Others have addressed Samba and the Windows clients. I believe Mac OS-X can access windows shares but it also has native NFS support, which I would consider preferable.
Re: centos 6 file server
[quote]
HyperInferno wrote:
I was just saying for a local file server, it doesn't REALLY matter. Which is why those are disabled on mine because the DD-WRT firewall is protecting it (coincidently enough, DD-WRT is protecting it using selinux and iptables, seems a little silly to have 2 of the exact same firewall, anyone who breaks through one, is going to break through the other just as fast).[/quote]
Right... and windows vista rocks. :-D
That's just so wrong on so many levels.
HyperInferno wrote:
I was just saying for a local file server, it doesn't REALLY matter. Which is why those are disabled on mine because the DD-WRT firewall is protecting it (coincidently enough, DD-WRT is protecting it using selinux and iptables, seems a little silly to have 2 of the exact same firewall, anyone who breaks through one, is going to break through the other just as fast).[/quote]
Right... and windows vista rocks. :-D
That's just so wrong on so many levels.