Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Someone I know is going hire a guy who's selling his services by saying things are unsecure at the moment, because samba is running as root. He promised to secure things by (among a few smaller things) configuring samba to run as a non-root user.
While I know my things around Linux, I know next-to-nothing about Samba. But I don't trust this. Apache can (and should!) run as a non-root user. But samba..?
Is it at all possible, let alone useful, to run samba as a non-priviledged user?
Is this guy a fraud?
Samba does a bit of both. Where apache only needs to access files that the "apache" user needs to access, samba needs to access all files that any user on the system may need to access. So the main samba daemon runs as root and then spawns a new proccess as each user as they connect.
Thanks. But running the processes spawned by the "main-daemon" as the users that connect is done always, and automatically, right?
That's exactly why I think the claim "running samba as non-root" is bogus. Samba needs to run as root, because it needs to fork processes as other users. Only root can do that. (that is correct, right?).
But is it possible for example to run samba as, say, user "data", so all files created on the share (via samba) will be owned by user "data"?
If that's possible, would it still be possible in that case to give different permissions on a share to different samba-users? I suppose not. But is that correct?
I can't see any reason why you couldn't have a directory owned by "data" run the service as the "data" user but I've never tried it. You wouldn't be able to setuid to other users though.
If you wanted to run it securely they running samba in a chrooted environment is more likely to succede.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.