Setting up a basic Samba Server - Centos 6
Hello,
I've been struggling with this samba server to no avail. I have a centos 6.6 system. The configuration file is really basic (just want to make sure it works outside): Quote:
$ smbclient \\\\localhost\\allaccess also works. I've managed to edit it through the samba client. I have also tested that the /etc/samba/smb.conf is the configuration file samba is working with. I have disabled iptables altogether to test it. $ netstat -tulpn | egrep "smb|nmb" displays the following (public ip is of course not shown and is changed to 192.168.1.0/24): Quote:
smb://192.168.1.1 (with or without /allaccess) And I've also tried it through windows 7 (on a virtual machine, of course with working internet connection). Run and then: \\192.168.1.1 with or without \allaccess (but also through \\name, consistent with the net bios directive and after changing it accordingly in windows's hosts) Can you offer me some other solutions? Thanks! |
disabled iptables. Do you mean selinux?
I only have a headless install of centos and I can't (off hand) think of how to "ssh -x" to the security settings. But, I am sure there is a setting which opens up samba. My notes on setting up samba include: Quote:
Quote:
Quote:
|
By disable iptables I simply mean $ service iptables stop.
Yes, both nmb and smb are on (it it shown in the netstat output) This is the output of the testparm command: Quote:
$ chcon -t samba_share_t /samba/allaccess/ (as you've reminded me of selinux) |
I must admit that I'm impressed by the huge support I've received on this forum. Whenever I encounter problems at least I know I'll get the necessary help here.
|
You wouldn't believe the number of times permissions has been the culplrit of samba setups.
Are you sure access is permitted? This means that /samba/allaccess must have permissions accessible to the samba user but /samba/ must also permit access, at least execute & read for the directory |
Quote:
Quote:
The thing is, when I try to connect from mac os (finder - go - connect to server - smb://192.168.1.1/allaccess) it simply says that "the server may not exist or it is unavailable at this time. Check the server name or IP address, your network connection, etc.)" Shouldn't the error be more explicit than that if there were any permission problems? As I've already said, I've disable iptables just to make sure (through service iptables stop). If it makes any difference, I should also say that when I connect to samba locally it asks for my user's password, which I can skip by simply pressing enter (by smbclient \\\\localhost\\allaccess or by smbclient -L localhost -> in order to see what folders are shared). Oh, and that the user on Mac OS does not have a corresponding user on Cent OS (although the Windows VM through which I tried to connect did) |
Only now did it occur to me to mention that the server and the client are not on the same network. So I'm trying to connect remotely. I've read that samba doesn't allow remote connections natively, right? I'm really not sure about what I'm doing. And if samba doesn't work, what other options are there? (for both Windows and Mac OS)
|
We will need additional information as to what you mean by remotely and what you are trying to accomplish.
You can use a sftp client like filezilla with windows as OS X to transfer files between computers. The details will depend on the above and your network configuration. |
I mean to say that they're not on the same LAN (the server and the client - the connection between the two goes through the internet).
The initial idea was to set up the most basic samba server in order to access data (files) on the server. Now that I realise that is not recommended (security, performance, etc.) and a little more complicated to do with samba if the server and the client are on different networks (so NOT on the same LAN), I am trying to find out about some other viable options. I know about filezilla, but I thought maybe I can set up something that looks more native. For instance, browsing and editing the data on the server with explorer or finder, respectively. |
Perhaps try public key based ssh? (edit: Actually, scratch that. ssh is amazing in a linux only enviroment, secure cli usage, gui usage, whatever. But I don't believe windows putty supports navigating through explorer - although you could use a form of scp to copy files to and from.)
Quote:
However, if under the same network, you go to 192.168.1.1 I suspect you would find it. If I go to 192.168.1.1, I don't expect to find your samba server there! ___ Think of internal & external like this: I am in my house. My postal address is 123 and go to room 1, then room 2. Then I go to your house at postal address 654 and go to room 1, then room 2. Are these rooms in the same place? If I were to describe to someone my location and I said, "I am in room 2", would you know where I am? |
Quote:
|
With osx you can use the sshfs fuse file system to mount a directory. Still uses sftp to but you get that native look. With windows the only way to get the native look is using a vpn.
Another idea would be go set up your own cloud with owncloud. |
Did you add your windows user in smbpasswd? Make sure file & printer sharing is enabled in your windows machine firewall, and that your windows machine is in the same workgroup as your linux samba server.
If all you need is manual file access from windows, winSCP works over ssh and provides an explorer-like interface. |
@Doug, thanks for the advice, but you should really read the posts beforehand. I've already figured out the problem.
@michaelk. Thanks. I'll probably try something sftp related. |
All times are GMT -5. The time now is 04:18 AM. |