HowTo: mount a USB hdd in Debian and share it for all users without authentication

All these I needed to do on my RaspberryPI so that I can share a mounted USB drive to the entire network and to be accessible fully without any authentication.
I know, not very smart, but try to configure a TV, 2 iPads, 1 iPhone, 1 Android and one Internet radio to access it.

 


My company, Endpoint Cybersecurity, offers consulting on how to prepare for TISAX, ISO27001, NIS2, CSMS and SOC2 audits. It also works with companies to create and deploy a Secure Software Development Lifecycle, with various levels of AI support.
Get in touch with us here: https://www.endpoint-cybersecurity.com/contact/

My USB Hdd is /dev/sda1 and it is mounted on /media/usb

 

/etc/samba/smb.conf

security = share
guest account = nobody

[media]
comment= Media
read only = no
path = /media
guest ok = yes
browseable = yes
public = yes
guest only = yes
guest account = nobody

 

/etc/fstab

/dev/sda1 /media/usb ntfs noatime,users,uid=0,gid=0,fmask=0111,dmask=0 0 2

 

Note:

This will allow all rights on the /media/usb to all users.

Don’t forget to restart the system or the services.

 


© Copyright 2013 Sorin Mustaca, All rights Reserved. Written For: Sorin Mustaca - Security & Technology


Want to work with me on this topic?
Check Endpoint Cybersecurity to see the consulting services we offer.