Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Can samba be run as non-root user?

I’ve set up a service to run samba as non-root user, where the config file for the daemon and the service are on my home directory (on the proper subdirectories). But I keep getting samba starts and samba stops and the process exists without any information. (Both on systemctl or journalctl).

Can samba be run as a service and non-root user?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No.

Samba listens to ports below 1024 (135, 445 namely), and convention requires that only root can bind ports below 1024.

However, Linux has a capability interface that can be used to allow services to bind to ports that are below 1024 without root:

sudo /sbin/setcap 'cap_net_bind_service=ep' /usr/sbin/smbd
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading