Samba newbie... Anyone got the time to take a look at my config?
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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?
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?
Last edited by MrScoville; 12-22-2015 at 11:47 AM.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.