2007年8月12日 星期日

Set samba server on CentOS

1. vi /etc/samba/smb.conf

[global]

workgroup =
netbios name = # computer name
server string = Samba Server # description of this computer
security = user
hosts allow = 192.168.1. # restrict access
load printers = yes
cups options = raw
log file = /var/log/samba/%m.log # %m = netbios name of clients
max log size = 50
dns proxy = no

[homes]
comment = Home Directories # description
browseable = no # is in the browse list
writable = yes
valid users = %S # %S = replace the text within []

[printers]
comment = All Printers
path = /usr/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes

[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes # is seen or not by anyone

[sample]
path = /home/sample
public = no
valid users = @users # @ = group
write list =

2. /usr/bin/testparm # check smb.conf configuration file for internal correctness
4. smbpasswd -a username # add user
5. /etc/init.d/smb start # start samba service
6. /sbin/chkconfig smb on # to start on boot

沒有留言: