DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th September 2008
bsduser bsduser is offline
Port Guard
 
Join Date: Jun 2008
Location: Toronto
Posts: 12
Default Samba 3.0 problem to setting up private folder - FreeBSD 71-pre

Hello ... I am new in Samba. I have 13 users in my local network, and each of these users own their home folder. what I want to do is to permit each users to have acces to their home folder only, with username and passwd or something like that ... I created as test user "winuser" and I add it in /etc/group as well,

Code:
winuser:*:1012:1012::0:0:Windows Q. User:/home/winuser:/bin/tcsh
and thats what I put in /usr/local/etc/smb.conf
Code:
[global]
workgroup = FREEBSDBOX
netbios name = Share
server string = %h-the-FreeBSD-Samba-Server
security = share
load printers = no
log file = /var/log/samba/log.%m
max log size = 50
passdb backend = tdbsam

[winuser]
comment = %h Windows User Share Directory
path = /usr/home/winuser/Docs
force directory mode = 0777
force create mode = 0777
force user = winuser
force group = winuser
writeable = yes
read only = no
browseable = yes

[public]
comment = %h Shared Public Directory
path = /usr/home/samba/public
force directory mode = 0777
force create mode = 0777
public = no
writeable = yes
read only = no

[Pietro]                          
comment = %h Rackbsd home
path = /usr/home/rackbsd
force directory mode = 0777
force create mode = 0777
public = no
writeable = yes
read only = no
So, as you can see for the user "winuser" I put these line here "force user = winuser" "force group = winuser" but unfortunately I can still join and doing whatever I want with every samba users in winuser home folder ... how come ? whats wrong in my /usr/local/etc/smb.conf ?? perhaps is there another way to do it ??
__________________
OpenSource + Free Thinking + Free Choise = FreeBSD
http://www.openbsd.org/zaurus.html
Edit/Delete Message
Reply With Quote
  #2   (View Single Post)  
Old 27th September 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Default

Code:
[winuser]
...
guest ok = no
username = winuser 
only user = yes
...
__________________
The power of plain text? It can control an entire OS
Reply With Quote
  #3   (View Single Post)  
Old 27th September 2008
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default

Code:
[winuser]
comment = %h Windows User Share Directory
path = /usr/home/winuser/Docs
valid users = winuser
public = no
writeable = yes
Check the user's home directory permissions. Also you don't need those lines, because you are giving the folder wrong permissions:
Code:
force directory mode = 0777
force create mode = 0777
Reply With Quote
  #4   (View Single Post)  
Old 27th September 2008
bsduser bsduser is offline
Port Guard
 
Join Date: Jun 2008
Location: Toronto
Posts: 12
Default

Quote:
Originally Posted by DNAeon View Post
Code:
[winuser]
comment = %h Windows User Share Directory
path = /usr/home/winuser/Docs
valid users = winuser
public = no
writeable = yes
Check the user's home directory permissions. Also you don't need those lines, because you are giving the folder wrong permissions:
Code:
force directory mode = 0777
force create mode = 0777
Thanks for your help, I tried your solution. but I think something is still mess up on this smb.conf, its still doesn't work, this time, when I tried to mount "winuser" shared folder, I got a message that said that it can't mount that share ... weird right ?

by the way, after put ur solution in /usr/local/etc/smb.conf I launched testparm for see if there is any mistake, and I got this

Code:
[winuser]
        comment = %h Windows User Share Directory
        path = /usr/home/winuser/Docs
        valid users = winuser
        read only = No
__________________
OpenSource + Free Thinking + Free Choise = FreeBSD
http://www.openbsd.org/zaurus.html
Edit/Delete Message
Reply With Quote
  #5   (View Single Post)  
Old 27th September 2008
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default

Quote:
Originally Posted by bsduser
but I think something is still mess up on this smb.conf, its still doesn't work, this time, when I tried to mount "winuser" shared folder, I got a message that said that it can't mount that share ... weird right ?
What do you mean by "mounting" the share? Perhaps log in the Samba server?
Post your full smb.conf and the folder permissions of winuser.
Reply With Quote
  #6   (View Single Post)  
Old 27th September 2008
bsduser bsduser is offline
Port Guard
 
Join Date: Jun 2008
Location: Toronto
Posts: 12
Default

Quote:
Originally Posted by DNAeon View Post
What do you mean by "mounting" the share? Perhaps log in the Samba server?
Post your full smb.conf and the folder permissions of winuser.
I just fixed the shared folders permision and I finally got it work properly, anyways, if you interested to see it, thats my smb.conf

Code:
[global]
        workgroup = FREEBSDBOX
        netbios name = SHARE
        server string = %h-the-FreeBSD-Samba-Server
        security = SHARE
        passdb backend = tdbsam
        log file = /var/log/samba/log.%m
        max log size = 50
        load printers = No

[winuser]
        comment = %h Windows User Share Directory
        path = /usr/home/winuser/Docs
        valid users = winuser
        read only = No

[public]
        comment = %h Shared Public Directory
        path = /usr/home/samba/public
        read only = No
        force create mode = 0777
        force directory mode = 0777

[Pietro]
        comment = %h Rackbsd home
        path = /usr/home/Pietro/Docs
        valid users = Pietro
        read only = No

[anna]
        comment = %h Anna Maria's home
        path = /usr/home/anna/Docs
        valid users = anna
        read only = No
I am gonna to add the rest of the network users, so they can have their own shared folder tomorrow Thanks so much
__________________
OpenSource + Free Thinking + Free Choise = FreeBSD
http://www.openbsd.org/zaurus.html
Edit/Delete Message
Reply With Quote
  #7   (View Single Post)  
Old 27th September 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Take another look at the default smb config file. It contains a share that will provide all users with their home directory, accessible only to them.

It also contains examples for how to create other dynamic shares. For a reference, check out the VARIABLE SUBSTITUTIONS section of the man page.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
  #8   (View Single Post)  
Old 27th September 2008
bsduser bsduser is offline
Port Guard
 
Join Date: Jun 2008
Location: Toronto
Posts: 12
Default

Quote:
Originally Posted by robbak View Post
Take another look at the default smb config file. It contains a share that will provide all users with their home directory, accessible only to them.

It also contains examples for how to create other dynamic shares. For a reference, check out the VARIABLE SUBSTITUTIONS section of the man page.
oh, I'll take a look, I am sure I'll find lots help .. thank you so much
__________________
OpenSource + Free Thinking + Free Choise = FreeBSD
http://www.openbsd.org/zaurus.html
Edit/Delete Message
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem setting up perl modules badguy OpenBSD Installation and Upgrading 4 10th August 2009 09:46 PM
Samba + Ldap... permission problem coppermine FreeBSD General 3 13th October 2008 10:00 AM
Samba Server on FreeBSD 6.1 MiniStrange FreeBSD General 1 8th August 2008 02:57 PM
samba problem sniper007 FreeBSD Ports and Packages 3 22nd June 2008 05:59 PM
FreeBSD+CUPS+Samba faustcoder FreeBSD General 6 20th May 2008 12:20 AM


All times are GMT. The time now is 05:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick