Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Distribution: Fedora, Mandriva, PCLOS, SUSE - anything a can get my hands on
Posts: 140
Rep:
Samba public share
Hi, Can someone please help me?
I am trying to setup a samba server with a share where everyone and anyone can copy and save files. The problem is that when ever i try to access it i get asked for a username and password. I've even chanced the guest account to root, but still no use.
I have been struggling with this thing fr a couple of hours now, and don't know what I'm doing wrong.
Here is my smb.conf file:
[global]
workgroup = NIP
server string = Linux Server
netbios name = neptune
encrypt passwords = yes
log file = /var/log/samba-log.%m
max log size = 50
os level = 65
preferred master = yes
wins proxy = yes
security = SHARE
hosts allow = 10.0.0. 127.
guest account = root
[public]
path= /mnt/data
comment = public
read only = No
public = yes
browseable = yes
guest ok = yes
I would save a copy of your smb.config. From there, I would take the default smb.confg and add
[public]
path= /mnt/data
comment = public
read only = No
public = yes
browseable = yes
guest ok = yes
Then replace the old smb with the edited default
Once you get that working, I'd tweak the smb file little by little until it meets your needs. This is what I did to make mine work after hours of trying to start from scratch with an smb file.
Here is an sample from "Samba 3 by Example". If you have swat installed then you may have this book on your computer at: http://localhost:901/swat/help/Samba...html#id2531126
I highlighted a couple lines. The force group and force user options are what I think that you are missing. You don't want the user/group to be root. It is common to use the user "nobody" to remove many permissions.
Code:
Example 2.2. Charity Administration Office smb.conf File
# Global Parameters
[global]
workgroup = MIDEARTH
security = SHARE
printing = CUPS
printcap name = CUPS
disable spoolss = Yes
show add printer wizard = No
wins support = yes
[FTMFILES]
comment = Funds Tracking & Management Files
path = /data/ftmfiles
read only = No
force user = abmas
force group = office
guest ok = Yes
nt acl support = No
[office]
comment = General Office Files
path = /data/officefiles
read only = No
force user = abmas
force group = office
guest ok = Yes
nt acl support = No
[printers]
comment = Print Temporary Spool Configuration
path = /var/spool/samba
printable = Yes
guest ok = Yes
use client driver = Yes
browseable = No
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.