Skip to content

Instantly share code, notes, and snippets.

@belminf belminf/
Last active Dec 31, 2015

What would you like to do?
Modify smb.conf to allow guest access to "public" share, using with asuswrt-merlin
# Grant guess access
sed -i '/\[public\]/,/^\[/ s/invalid users.*/guest only = yes\nwritable = yes/' /etc/smb.conf
# Remove user-specific ACLs
sed -i '/\[public\]/,/\[/ {/^\(valid\|invalid\|read\|write\)/d}' /etc/smb.conf
# Kill samba processes running
for pid in $(ps -w | grep [s]mbd | awk '{ print $1 }')
kill $pid 2> /dev/null
# Restart samba with modified config
smbd -D -s /etc/smb.conf

This comment has been minimized.

Copy link
Owner Author

belminf commented Dec 31, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.