append="ether=5,0xe400,eth0 ether=9,0xe800,eth1"IRQ, Base Address を明示することが必要。これらは、起動時に流れるメッセージ中から見つけられる。dmesg で見られる。
$ more /etc/init.d/network #! /bin/sh ... ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} route add -net ${NETWORK} dev eth0 [ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1 dev eth0 # 2nd nic ifconfig eth1 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 route add -net 192.168.0.0 dev eth1
$ /sbin/ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0 UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 Collisions:0 eth0 Link encap:Ethernet HWaddr 00:90:27:2E:75:B4 inet addr:133.50.133.142 Bcast:133.50.133.255 Mask:255.255.254.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3613 errors:0 dropped:0 overruns:0 frame:0 TX packets:2579 errors:0 dropped:0 overruns:0 carrier:0 Collisions:7 Interrupt:5 Base address:0xe400 eth1 Link encap:Ethernet HWaddr 00:00:F4:95:55:87 inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:615 errors:0 dropped:0 overruns:0 frame:0 TX packets:597 errors:0 dropped:0 overruns:0 carrier:0 Collisions:27 Interrupt:9 Base address:0xe800
# vi /etc/init.d/delegate 編集する.結果は以下. #!/bin/sh delegated -P25 SERVER=smtp://mail.ep.sci.hokudai.ac.jp/ \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ RELIABLE=192.168.0.[1-254] -vt delegated -P8080 SERVER=http://-/ \ RELIABLE=192.168.0.[1-254] -vt \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ MANAGER="postj@ep.sci.hokudai.ac.jp" CACHE="no" delegated -P8021 SERVER=ftp://-/ \ RELIABLE=192.168.0.[1-254] -vt \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ CACHE="no" delegated -P8023 SERVER=telnet://-/ \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ RELIABLE=192.168.0.[1-254] -vt delegated -P8022 SERVER=tcprelay://mail.ep.sci.hokudai.ac.jp:22/ \ PERMIT="*:mail.ep.sci.hokudai.ac.jp:192.168.0.[1-254]" \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ -vt delegated -P8122 SERVER=tcprelay://www.ep.sci.hokudai.ac.jp:22/ \ PERMIT="*:www.ep.sci.hokudai.ac.jp:192.168.0.[1-254]" \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ -vt delegated -P110 SERVER=pop://-/ \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ RELIABLE=192.168.0.[1-254] -vt delegated -P143 SERVER=tcprelay://mail.ep.sci.hokudai.ac.jp:143/ \ PERMIT="*:mail.ep.sci.hokudai.ac.jp:192.168.0.[1-254]" \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ -vt delegated -P119 SERVER=nntp://earth.ees.hokudai.ac.jp/ \ RELIABLE=192.168.0.[1-254] -vt \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ MANAGER="postj@ep.sci.hokudai.ac.jp" CACHE="no" delegated -P21 SERVER=ftp MOUNT="/* ftp://192.168.0.x/*" \ PERMIT="ftp:192.168.0.x:133.50.[128-133].[1-254]" \ -vd \ LOGDIR='/var/log/delegate/[date+aged/%y/%m/%d]' \ OWNER='delegate' \ ADMIN='postj@ep.sci.hokudai.ac.jp' \ CACHE="no" 以上. # chmod 755 /etc/init.d/delegate # cd /etc/rc2.d/ # ln -s ../init.d/delegate S80delegate # ls -al S80delegate lrwxrwxrwx 1 root root 15 S80delegate -> ../init.d/delegate # cd /etc/rc3.d/ # ln -s ../init.d/delegate S80delegate # ls -al S80delegate lrwxrwxrwx 1 root root 15 S80delegate -> ../init.d/delegate # cd /etc/rc4.d/ # ln -s ../init.d/delegate S80delegate # ls -al S80delegate lrwxrwxrwx 1 root root 15 S80delegate -> ../init.d/delegate # cd /etc/rc5.d/ # ln -s ../init.d/delegate S80delegate # ls -al S80delegate lrwxrwxrwx 1 root root 15 S80delegate -> ../init.d/delegate
$ more /etc/dhcpd.conf default-lease-time 600; max-lease-time 7200; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.100 192.168.0.249; }
# cp /etc/init.d/dhcp /etc/init.d/dhcp.orig # vi /etc/init.d/dhcp Edit. $ cat dhcp #! /bin/sh # Kyoma T. /usr/sbin/dhcpd -d -cf /etc/dhcpd.conf -lf /var/dhcp/dhcpd.leases eth1 | /usr/bin/logger -t dhcpd &
$ more /etc/init.d/network ... # 2nd nic ifconfig eth1 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 route add -net 192.168.0.0 dev eth1 route add -host 255.255.255.255 dev eth1
# /etc/init.d/network
# /etc/init.d/dhcp-d によって動作が逐一標準出力に出る。-f フォアグラウンドで実行。
; ; /etc/smb.conf ; [global] printing = bsd printcap name = /etc/printcap load printers = yes guest account = nobody invalid users = root ; "security = user" is always a good idea. This will require a Unix account ; in this server for every user accessing the server. security = user ; Change this for the workgroup your Samba server will part of workgroup = POSTJ server string = %h server (Samba %v) ; This socket options really speed up Samba under Linux, according to my ; own tests. socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096 ; Passwords are encrypted by default. This way the latest Windows 95 and NT ; clients can connect to the Samba server with no problems. encrypt passwords = no ; It's always a good idea to use a WINS server. If you want this server ; to be the WINS server for your network change the following parameter ; to "yes". Otherwise leave it as "no" and specify your WINS server ; below (note: only one Samba server can be the WINS server). ; Read BROWSING.txt for more details. wins support = yes ; If this server is not the WINS server then specify who is it and uncomment ; next line. ; wins server = 172.16.0.10 ; Please read BROWSING.txt and set the next four parameters according ; to your network setup. There is no valid default so they are commented ; out. ; os level = 0 ; domain master = no ; local master = no ; preferred master = no ; What naming service and in what order should we use to resolve host names ; to IP addresses ; name resolve order = lmhosts host wins bcast ; This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no ; Name mangling options preserve case = yes short preserve case = yes ; This boolean parameter controlls whether Samba attempts to sync. the Unix ; password with the SMB password when the encrypted SMB password in the ; /etc/smbpasswd file is changed. ; unix password sync = false ; For Unix password sync. to work on a Debian GNU/Linux system, the following ; parameters must be set (thanks to Culus for pointing this out): ; passwd program = /usr/bin/passwd %u ; passwd chat = *New\spassword:* %n\n *Re-enter\snew\spassword:* %n\n *Password\schanged.* . ; The following parameter is useful only if you have the linpopup package ; installed. The samba maintainer and the linpopup maintainer are ; working to ease installation and configuration of linpopup and samba. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & ; The default maximum log file size is 5 MBytes. That's too big so this ; next parameter sets it to 1 MByte. Currently, Samba rotates log ; files (/var/log/{smb,nmb} in Debian) when these files reach 1000 KBytes. ; A better solution would be to have Samba rotate the log file upon ; reception of a signal, but for now on, we have to live with this. max log size = 1000 ; HAYASHI Lab. ; coding system = hex coding system = cap allow hosts = 192.168.0. [public] comment = Public POSTJ path = /home/public public = yes browseable = yes writable = yes create mask = 0766 directory mask = 0777 [homes] comment = Home Directories browseable = yes ; By default, the home directories are exported read only. Change next ; parameter to "no" if you want to be able to write to them. read only = no ; File creation mask is set to 0700 for security reasons. If you want to ; create files with group=rw permissions, set next parameter to 0775. create mask = 0744 ; Directory creation mask is set to 0700 for security reasons. If you want to ; create dirs. with group=rw permissions, set next parameter to 0775. directory mask = 0755 [printers] comment = All Printers browseable = no path = /tmp printable = yes public = no writable = no create mode = 0700
# mkdir /home/public # chmod 777 /home/public $ ls /home/ -l drwxrwxrwx 4 root staff 1024 Oct 31 13:21 public ...
1マイコンピューターのコントロールパネルを開く。 2コントロールパネルのネットワークを開く。 3ネットワークの設定でマイクロソフト共有サービスのプロパティを開く。 4LMアナウンスを「はい」にし、ブラウズマスターを「無効」にする。エイリアスを作りたい場合にはまず、サーバーに入って然るべきフォルダの所で右クリックをすると ネットワークドライブの割り当てを聞かれる。これによって仮想ドライブをネットワーク上のフォルダに 割り当てることができる。その後、そのドライブのエイリアスをデスクトップなどに持ってくればよい。
$ cat /etc/netatalk/atalkd.conf eth0起動すると,この後に勝手に文字列が付く.
eth0 -phase 2 -net 0-65534 -addr 65280.53
$ more AppleVolumes.default # default user-specific volumes to be exported go here. # this file can be overridden by a file named 'AppleVolumes' in the # user's home directory. # local directory name of macintosh volume ~/ "Home Directory" # public /home/public/ "Public POSTJ"
# mkdir /home/public # chmod 777 /home/public $ ls /home/ -l drwxrwxr-x 4 root staff 1024 Oct 31 13:21 public ...