LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   creating a safe samba config (https://www.linuxquestions.org/questions/linux-newbie-8/creating-a-safe-samba-config-257648/)

ninmonkeys 11-21-2004 02:10 PM

creating a safe samba config
 
I have the dir
Code:

$ ls -ld /shared/
drwxr-xr-x  2 jake users 112 2004-11-21 13:36 /shared/

That I want "jake" to be able to write to.

On my lan, which all have ip's of 192.168.1.xxx I want to allow read only access to this directory.

So I need to 1) allow only lan IP's to connect to my computer, and 2) allow read only access to my directory to win computers on the network.

I'm confused by the output of "testparm"
Code:

[global]
        workgroup = HOME
        server string = Jake Linux Server
        passdb backend = tdbsam
        log file = /usr/local/samba/var/log.%m
        max log size = 50
        dns proxy = No
        hosts allow = 192.168.1.

[data]
        comment = Data
        path = /shared
        guest ok = Yes

But when I check my config file, I get
Code:

[data]
  comment = Data
  path = /shared
  read only = yes
#syn for guest ok
  public = yes

1) I believe I have this solved with my hosts allow line, correct me if I am wrong.

2) Why Does the testparm not show read only? This worries me that guest users will be able to edit my files.

After I get this fixed, I want to later add a subdirectory that someone on my LAN can copy a file to, so I can access it. (ex: /shared/public ) that has read/write access either with a password or guest, it shouldn't matter since I only allow people on my LAN to write to my computer.

Any advice would be greatly appreciated.

thanks
--monkey

Peacedog 11-21-2004 04:47 PM

Have you restarted the smbd, and nmbd? You'll have to do that after any changes you make to the smb.conf for them to take effect.
good luck.

ninmonkeys 11-22-2004 04:09 PM

1) How do you restart it? I wrote a script that the howto toldhow to start samab, but not how to end/restart it. I haven't started it yet because of not knowing how to stop it besides rebooting, and

2) I'm confused by the output of testparm. Why Does the testparm not show read only? This worries me that guest users will be able to edit my files.

Peacedog 11-22-2004 05:03 PM

1) smbd stop
nmbd stop

smbd start
nmbd start

2) I think you have to restart the daemons for the changes to take effect.

good luck.


All times are GMT -5. The time now is 10:42 AM.