顯示具有 samba 標籤的文章。 顯示所有文章
顯示具有 samba 標籤的文章。 顯示所有文章

2009年4月22日 星期三

Some Error Messages Keep Appearing in Samba Log on Linux

printing/pcap.c:pcap_cache_reload(178)
Unable to open printcap file /etc/printcap for read!

printing/print_cups.c:cups_connect(103)
Unable to connect to CUPS server localhost:631 - Connection refused

solution:

load printers = no
printcap name = /dev/null
printing = bsd


lib/util_sock.c:get_peer_addr_internal(1676)
getpeername failed. Error was Transport endpoint is not connected

solution:

smb ports = 139

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