LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Samba newbie... Anyone got the time to take a look at my config? (https://www.linuxquestions.org/questions/linux-security-4/samba-newbie-anyone-got-the-time-to-take-a-look-at-my-config-4175562047/)

MrScoville 12-21-2015 09:44 AM

Samba newbie... Anyone got the time to take a look at my config?
 
Quite frankly I'm not only a freshman when it comes to samba, but I'm not that interested in getting an expert. Because the only reason I'm using it it lazyness. I could set up an FTP server or whatnot on my Raspberry to accomplish the same goals which are, essentially, just a few pushes and shoves of files and folders and tarballs every other day.

The only share that is involved is a folder named "/transfer" which is (a) a discrete partition (although mounted at boot time) and (b) owned by "root", group'ed to "sambausers", and set to 0770.

The group "sambausers" is in no case a user's primary group, but they become explicitly added to the group per use-case. Members of the group "sambausers" are assigned "/bin/nologin" as their shell so they cannot login to the Raspberry locally or remotely via ssh. Users of the group "sambausers" will only belong to this group and their personal group (user "foo" -> group "foo").

My /etc/samba/smb.conf looks like this:

Code:

[global]
  workgroup = smb
  wins support = no
  dns proxy = no
  server role = standalone server

  # eth0 is the standard Cat5 wired ethernet port
  interfaces = eth0
  bind interfaces only = yes

  security = user
  usershare allow guests = no

  panic action = /usr/share/samba/panic-action %d
  log file = /var/log/samba/log.%m
  max log size = 10000
  syslog = 0

[transfer]
  path = /transfer
  public = no
  writeable = no
  write list = @sambausers
  printable = no
  guest ok = no
  create mask = 0770
  directory mask = 0770

"eth0" has been configured to be a static a.b.c.d/24 interface in "/etc/network/interfaces".

To make things short: Is this config for a device that "lives at home" most of the time sufficient? Anything weird? Unneeded? Missing?

Thanks in advance for any hints etc.,

AND HAVE A MERRY CHRISTMAS EVERYONE! *<:-{)}

rtmistler 12-22-2015 06:27 AM

Does it work for you?

MrScoville 12-22-2015 09:56 AM

Quote:

Originally Posted by rtmistler (Post 5467532)
Does it work for you?

Yes, it does, but that doesn't answer my question. As I said, I am a newbie to Samba stuff, and I wouldn't like my toy to be vulnerable because of my ignorance... I don't need a rock-solid masterpiece of marble, just want it not to appear as the open gate of a castle to some script kiddies from China ;)

Nevertheless, have a merry xmas!

rtmistler 12-22-2015 11:09 AM

You say it's on a private Ethernet interface?

If so, the solution is not in SAMBA configuration but configuration your system where it will not allow traffic from the public Ethernet to get to your private Ethernet. Also because you've already limited SAMBA to that wired Ethernet, it will then not be available to the public one ... I'm assuming WIFI?

MrScoville 12-22-2015 11:46 AM

Quote:

Originally Posted by rtmistler (Post 5467624)
You say it's on a private Ethernet interface?

If so, the solution is not in SAMBA configuration but configuration your system where it will not allow traffic from the public Ethernet to get to your private Ethernet. Also because you've already limited SAMBA to that wired Ethernet, it will then not be available to the public one ... I'm assuming WIFI?

Well, most of the time it will be wired Ethernet, exactly. But the toy has been equipped with a WiFi stick, and a GSM/GPRS hat. Both are not yet configured to be up, but they will eventually. As long as the Pi is "at home", it will be connected to my local network which actually consists of my notebook, a hub, and the Pi.

The thing is, "my Pi" is going to move to wherever I go, and perhaps even further. And I want to teach it to connect to whatever available internet access point if in need. Like it was urgently wanting to learn and communicate. Let's call it a slightly different approach to "Tell, don't ask".

But anyhow, the question remains: Does my config look secure to you experts?

rtmistler 12-22-2015 12:46 PM

Once again I feel the security of that interface is better handled at configuring that interface and not merely the Samba protocol. I see no problem with the Samba configuration. You've limited the users and the network interface that it gets used on.


All times are GMT -5. The time now is 09:12 AM.