LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-25-2009, 11:04 PM   #1
Jon W
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Rep: Reputation: 0
Question How to password protect a folder in samba?


I've been trying to figure out for awhile how to password protect just one folder in my samba main directory.

To explain I have a family here that also uses the file server... So there is files on the file server they use too but I want to show my web folder on the samba server too but I don't want anyone but me being able to get into the folder changing or anything, or even viewing it without a password first. How would this be done?
 
Old 10-26-2009, 03:09 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
not a networking question. moved to Linux - Server.
 
Old 10-26-2009, 06:25 PM   #3
Jon W
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Does anyone know the answer to this question?
 
Old 10-26-2009, 08:23 PM   #4
GaHillBilly
LQ Newbie
 
Registered: Sep 2009
Location: Georgia
Distribution: Slackware & Ubuntu
Posts: 9

Rep: Reputation: 0
Yea. I do that.

One way is to create a folder, say /home/family and share it twice in Samba, once as "family" and again as "family-ro". Make the first share accessible r/w to yourself and whoever, and the second accessible to everyone r/o.

GaHillBilly
 
Old 10-26-2009, 08:30 PM   #5
Jon W
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Original Poster
Rep: Reputation: 0
I don't think I quite follow you. Can you elaborate on this?
 
Old 10-27-2009, 05:22 AM   #6
GaHillBilly
LQ Newbie
 
Registered: Sep 2009
Location: Georgia
Distribution: Slackware & Ubuntu
Posts: 9

Rep: Reputation: 0
I didn't read your original post well enough. I don't know how to protect one folder INSIDE of an existing r/w share. To do what I wrote, you'd need to create a second folder OUTSIDE the original share. Then you can share this second folder two ways, r/w and r/o, depending on who's trying to access it.

(I'm actually not sure what would happen if you tried to share a folder r/o inside an existing r/w share.)

GaHillBilly
 
Old 10-27-2009, 06:57 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Just a case of setting the right security in your smb.conf for that specific share. I believe if you set "valid users = yourusername" and then configure smbpasswd correctly, then only you would be able to access that specific share.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Password protect a web folder on apache andy1974 Linux - Security 13 05-15-2009 01:28 AM
How to protect shared folder with password in opensuse11 praveenakm Linux - Newbie 1 03-14-2009 05:07 AM
Password protect folder? sall Linux - Security 4 07-18-2005 05:57 PM
Password Protect Folder?? sall Linux - Software 5 07-18-2005 06:58 AM
Looking for a way to password protect a file within my Home folder BadKarma Linux - Security 2 12-26-2003 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:18 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