LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-23-2013, 06:04 AM   #1
anindyameister
Member
 
Registered: Oct 2012
Posts: 47

Rep: Reputation: Disabled
Samba with public and private share


I am trying to setup a samba server with two shares where one is public and the other private. I am keeping the security as share to make both the shares visible when people access just the ip from their windows box. But when I am trying to open the private share, the user is automatically taken up as guest and the username box is disabled. So my question is how can I keep the shares visible while making private shares accessible with an username of my choice ?

Here's my global section and share section of smb.conf file

Code:
[global]

security = share
passdb backend = smbpasswd
encrypt passwords = true
map to guest = bad user
guest account = nobody
create mask = 0644
directory mask = 0755

[private]
comment = Private Share
path = <Private path>
public = no
valid users = <users with access>
readable = yes
writable = yes
browsable = yes
security = user

[public]
comment = Public Share
public = yes
path = <Public Path>
read only = yes
guest ok = yes
 
Old 05-23-2013, 10:33 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
That is the way that security = share works.

The security=user parameter is only valid in the global section.

You are better off using security = user and add users,passwords via the smbpasswd commands. Your public share should work given that you have the guest ok and guest account parameters.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
both public & private shares in a single samba server Gil@LQ Linux - Server 1 12-20-2011 12:57 AM
samba: permission for sharing public and private folder zamri Linux - Software 16 02-02-2011 07:49 AM
samba public/private shares thchittenden Linux - Software 2 06-09-2009 04:36 PM
Samba not working as intended. Private / Public share's ILikeVoltron Linux - Networking 3 03-14-2006 04:22 PM
public share in samba brasuca Linux - Software 2 05-10-2004 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration