Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Iam new to the samba, so can anyone please give basic information to configure smb.conf.

And also how it provides permissions and authentication?

share|improve this question

closed as too broad by yoonix, Sven Dec 11 '14 at 8:41

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

The portion of smb.conf that creates an actual share looks like this:

   comment = the foobar directory
   path = /usr/local/foobar

There are a lot more options that can be set for shares in smb.conf, but the above is the basic skeleton.

There are also many options that can be set in smb.conf that relate to general operation, and those control the authentication mechanism as well as much else. To give an exhaustive list would be difficult in a single answer, but the samba project's own how-to collection is a very good place to start.

As for permissions, once you have the authentication model set up, a rule of thumb that has served me well is: samba wants to associate your file-sharing connection with a specific unix user, and that will usually be the user that you authenticate as. samba will not let you do anything to a file that you couldn't do anyway if you were just logged in to the server as that user.

Even that can be configured to be untrue, but more times than I can count I've sorted out samba permissions problems by going into the server as that user and showing that e.g. write to the file doesn't work, or the directory is not listable (browsable).

share|improve this answer

In CentOS/Red Hat/Fedora systems you can use system-config-samba to easily configure samba service. If you want just a public shared, use preferences -> server configuration -> security -> authentication mode = shared. For user based authentication use user mode. Add the directories to be shared and the users permissions too.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.