# tail -f /var/log/messages ---- Unable to find the Domain Master Browser name ワークグループ名<1b> for the workgroup ワークグループ名. Unable to sync browse lists in this workgroup. ----
# vi /etc/samba/smb.conf ---- local master = yes domain master = yes preferred master = auto wins support = yes os level = 20 ---- # service smb restart
# tail -f /var/log/messages ---- Jun 27 20:24:25 tech-fsv smbd[7812]: [2007/06/27 20:24:25, 0] printing/print_cups.c:cups_cache_reload(85) Jun 27 20:24:25 tech-fsv smbd[7812]: Unable to connect to CUPS server localhost - Connection refused .... ----
# chkconfig cups on # service cups start # service smb restart
# fdisk -l Disk /dev/hda: 122.9 GB, 122942324736 bytes 255 heads, 63 sectors/track, 14946 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 14946 119949322+ 8e Linux LVM ... Disk /dev/hdb: 300.0 GB, 300090728448 bytes ... Disk /dev/hdd: 61.4 GB, 61492838400 bytes
# fdisk /dev/hdb # fdisk /dev/hdd
# mkfs.ext3 /dev/hdb1 # mkfs.ext3 /dev/hdd1
# mkdir /mnt/samba # mkdir /mnt/backup # mount -t ext3 /dev/hdb1 /mnt/samba # mount -t ext3 /dev/hdd1 /mnt/backup
# vi /etc/fstab --------------------- /dev/hdb1 /mnt/samba ext3 defaults 1 2 /dev/hdd1 /mnt/backup ext3 defaults 1 2 ---------------------
# vi /etc/samba/lmhosts -------------------------------------------- 127.0.0.1 tech-fsv 192.168.0.9 example-fsv --------------------------------------------
# vi /etc/samba/smb.conf -------------------------------------------- [global] dos charset = CP932 unix charset = EUCJP-MS display charset = EUCJP-MS vfs objects = recycle socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 workgroup = example server string = security = server load printers = no disable spoolss = yes
password server = example-fsv encrypt passwords = yes local master = yes wins support = yes dns proxy = no add user script = /usr/sbin/useradd -d /mnt/samba/home/%u -g samba -s /bin/false -m -k /mnt/samba/etc/skel %u;chmod 755 /mnt/samba/home/%u; delete user script = /usr/sbin/userdel %u [homes] comment = Home Directories browseable = no writable = yes recycle:repository = .recycle recycle:keeptree = yes recycle:versions = yes recycle:touch = yes recycle:maxsize = 0 recycle:exclude = *.tmp *.temp *.o *.obj ~$* *.~?? recycle:exclude_dir = /tmp|/cache # recycle:noversions = *.doc *.xls *.ppt [public] comment = Public Stuff path = /mnt/samba/home writable = yes printable = no recycle:repository = .recycle/%u recycle:keeptree = yes recycle:versions = yes recycle:touch = yes recycle:maxsize = 0 recycle:exclude = *.tmp *.temp *.o *.obj ~$* *.~?? recycle:exclude_dir = /tmp|/cache ; recycle:noversions = *.doc *.xls *.ppt ; public = yes ; write list = @staff --------------------------------------------
# mkdir /mnt/samba/home/.recycle # chmod 777 /mnt/samba/home/.recycle
# chkconfig smb on # service smb restart
# vi /etc/cron.weekly/samba_recyclewatch ------------------------------------ #!/bin/bash samba_home="/mnt/samba/home" delete_hours=168 for user in `/bin/ls $samba_home` do if [ -d "$samba_home/$user/.recycle" ] then /usr/sbin/tmpwatch -a -f $delete_hours "$samba_home/$user/.recycle" for D in `find "$samba_home/$user/.recycle" -type d | sort -r ` ; do echo $D ;rmdir $D ; done fi done /usr/sbin/tmpwatch -a -f $delete_hours "$samba_home/.recycle" for D in `find "$samba_home/.recycle" -type d | sort -r ` ; do echo $D ;rmdir $D ; done ------------------------------------ # chmod 755 /etc/cron.weekly/samba_recyclewatch
転送終了時に以下のエラーが/var/log/messageに記録されている。どうやら、クライアントがメッセンジャーサービスに対応していないと出る模様。無視して構わないみたい。
Error writing 4 bytes to client. -1.