ott@phtd.tpu.edu.ru
ðÒÉÍÅÞÁÎÉÅ ÐÅÒÅ×ÏÄÞÉËÁ: ûÌÉÔÅ ÍÎÅ ÌÀÂÙÅ ËÏÍÍÅÎÔÁÒÉÉ É ÚÁÍÅÞÁÎÉÑ, ÄÁÖÅ ÎÅÂÏÌØÛÉÅ.
üÔÏ SMB HOWTO. üÔÏÔ ÄÏËÕÍÅÎÔ ÏÐÉÓÙ×ÁÅÔ ÉÓÐÏÌØÚÏ×ÁÎÉÅ × Linux ÐÒÏÔÏËÏÌÁ Server Message Block (SMB), ËÏÔÏÒÙÊ ÉÎÏÇÄÁ ÔÁËÖÅ ÎÁÚÙ×ÁÅÔÓÑ ÐÒÏÔÏËÏÌÏÍ Session Message Block (SMB), ÐÒÏÔÏËÏÌÏÍ NetBIOS ÉÌÉ ÐÒÏÔÏËÏÌÏÍ LanManager. èÏÔÑ ÜÔÏÔ ÄÏËÕÍÅÎÔ É ÐÒÅÄÎÁÚÎÁÞÅÎ ÄÌÑ Linux, ÎÏ Samba ÍÏÖÅÔ ÒÁÂÏÔÁÔØ ÎÁ ÂÏÌØÛÉÎÓÔ×Å Unix-ÐÏÄÏÂÎÙÈ ÏÐÅÒÁÃÉÏÎÎÙÈ ÓÉÓÔÅÍ.
üÔÏÔ ÄÏËÕÍÅÎÔ ÓÏÐÒÏ×ÏÖÄÁÅÔÓÑ David Wood ( dwood@plugged.net.au). äÏÂÁ×ÌÅÎÉÑ, ÉÚÍÅÎÅÎÉÑ ÉÌÉ ÉÓÐÒÁ×ÌÅÎÉÑ ÍÏÇÕÔ ÂÙÔØ ÐÏÓÌÁÎÙ ÅÍÕ ÄÌÑ ×ËÌÀÞÅÎÉÑ × ÓÌÅÄÕÀÝÉÊ ×ÙÐÕÓË.
âÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï ÄÏËÕÍÅÎÔÁÃÉÉ ÐÏ Samba ÄÏÓÔÕÐÎÏ ÎÁ WWW-ÓÅÒ×ÅÒÅ Samba, ËÏÔÏÒÙÊ ÎÁÈÏÄÉÔÓÑ ÐÏ ÁÄÒÅÓÕ http://www.samba.org/. ÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÇÒÕÐÐÕ ÎÏ×ÏÓÔÅÊ comp.protocols.smb.
ðÒÏÔÏËÏÌ SMB ÉÓÐÏÌØÚÕÅÔÓÑ Microsoft Windows 3.11, NT É 95/98 ÄÌÑ ÏÒÇÁÎÉÚÁÃÉÉ ÄÏÓÔÕÐÁ Ë ÄÉÓËÁÍ É ÐÒÉÎÔÅÒÁÍ. éÓÐÏÌØÚÕÑ ÎÁÂÏÒ ÕÔÉÌÉÔ Samba ÏÔ Andrew Tridgell ( Andrew.Tridgell@anu.edu.au), UNIX-ÍÁÛÉÎÙ (×ËÌÀÞÁÑ Linux) ÍÏÇÕÔ ÏÒÇÁÎÉÚÏ×Ù×ÁÔØ ÄÏÓÔÕÐ Ë ÄÉÓËÁÍ É ÐÒÉÎÔÅÒÁÍ ÄÌÑ Windows-ÍÁÛÉÎ. õÔÉÌÉÔÙ smbfs ÎÁÐÉÓÁÎÎÙÅ Paal-Kr. Engstad ( pke@engstad.ingok.hitos.no) É Volker Lendecke ( lendecke@namu01.gwdg.de) ÄÁÀÔ ×ÏÚÍÏÖÎÏÓÔØ ÍÁÛÉÎÁÍ Ó Unix ÍÏÎÔÉÒÏ×ÁÔØ SMB-ÒÅÓÕÒÓÙ ÄÏÓÔÕÐÎÙÅ ÎÁ ÍÁÛÉÎÁÈ Ó Windows ÉÌÉ Samba.
þÅÔÙÒÅ ×ÅÝÉ, ËÏÔÏÒÙÅ ÍÏÖÎÏ ÄÅÌÁÔØ Ó ÐÏÍÏÝØÀ Samba:
ïÂÏ ×ÓÅÍ ÜÔÏÍ ÒÁÓÓËÁÚÙ×ÁÅÔÓÑ × ÜÔÏÍ ÄÏËÕÍÅÎÔÅ.
ïÔËÁÚ ÏÔ ÏÔ×ÅÔÓÔ×ÅÎÎÏÓÔÉ: ðÒÏÃÅÄÕÒÙ É ÐÒÏÇÒÁÍÍÙ ÌÉÂÏ ÒÁÂÏÔÁÀÔ ÄÌÑ Á×ÔÏÒÁ, ÌÉÂÏ ÂÙÌÏ ÓÏÏÂÝÅÎÏ, ÞÔÏ ÏÎÉ ÒÁÂÏÔÁÀÔ ÄÌÑ ÌÀÄÅÊ, ËÏÔÏÒÙÅ ÒÁÚÒÁÂÏÔÁÌÉ ÉÈ. òÁÚÌÉÞÎÙÅ ËÏÎÆÉÇÕÒÁÃÉÉ ÍÏÇÕÔ ÎÅ ÒÁÂÏÔÁÔØ Ó ÉÎÆÏÒÍÁÃÉÅÊ ÄÁÎÎÏÊ ÚÄÅÓØ. åÓÌÉ ×Ù ÓÔÏÌËÎÕÌÉÓØ Ó ÔÁËÏÊ ÓÉÔÕÁÃÉÅÊ, ×Ù ÍÏÖÅÔÅ ÐÏÓÌÁÔØ ÓÏÏÂÝÅÎÉÅ Á×ÔÏÒÕ ÄÏËÕÍÅÎÔÁ Ó ÐÏÖÅÌÁÎÉÑÍÉ ÄÌÑ ÅÇÏ ÕÌÕÞÛÅÎÉÑ, ÎÏ Á×ÔÏÒ ÎÉÞÅÇÏ ÎÅ ÇÁÒÁÎÔÉÒÕÅÔ. þÔÏ ×Ù ÏÖÉÄÁÌÉ? á×ÔÏÒ, ËÒÏÍÅ ×ÓÅÇÏ ÐÒÏÞÅÇÏ, ËÏÎÓÕÌØÔÁÎÔ...
úÁÍÅÔÉÍ, ÞÔÏ ÄÌÑ ÄÏÓÔÕÐÁ Ë SMB-ÒÅÓÕÒÓÁÍ Ó ÍÁÛÉÎ Ó Windows 3.x, ÎÁ ÎÉÈ ÄÏÌÖÅÎ ÂÙÔØ ÕÓÔÁÎÏ×ÌÅÎ ÓÔÜË TCP/IP É ÂÉÂÌÉÏÔÅËÉ Win32s. ïÂÁ ÜÔÉÈ ËÏÍÐÏÎÅÎÔÁ ÄÏÓÔÕÐÎÙ Ó ÓÅÒ×ÅÒÁ ÆÉÒÍÙ Microsoft ( http://www.microsoft.com).
üÔÏÔ ÄÏËÕÍÅÎÔ ÄÅÌÁÅÔ ÐÏÐÙÔËÕ ÏÂßÑÓÎÉÔØ ËÁË ÎÁÓÔÒÏÉÔØ ÏÓÎÏ×ÎÙÅ ÆÁÊÌÏ×ÙÅ É ÐÒÉÎÔÅÒÎÙÅ SMB-ÓÅÒ×ÉÓÙ ÎÁ Linux-ÍÁÛÉÎÅ. Samba Ñ×ÌÑÅÔÓÑ ÏÞÅÎØ ÓÌÏÖÎÙÍ É ÚÁËÏÎÞÅÎÎÙÍ ÐÁËÅÔÏÍ. îÅÚÁÞÅÍ ÐÙÔÁÔØÓÑ ÄÕÂÌÉÒÏ×ÁÔØ ÚÄÅÓØ ×ÓÀ ÄÏËÕÍÅÎÔÁÃÉÀ ÎÁ Samba.
äÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ ÓÍÏÔÒÉÔÅ ÓÌÅÄÕÀÝÉÅ ÄÏËÕÍÅÎÔÙ:
ëÏÎÃÅÐÃÉÉ É ÍÅÔÏÄÙ.
ðÏÄÒÏÂÎÙÅ ÓÐÅÃÉÆÉËÁÃÉÉ
óÎÁÞÁÌÁ, ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÉÓÐÏÌØÚÏ×ÁÔØ Samba ×ÁÛÁ ÍÁÛÉÎÁ ÄÏÌÖÎÁ ÎÁÈÏÄÉÔÓÑ × ÏÄÉÎÏÞÎÏÍ ethernet-ÓÅÇÍÅÎÔÅ ÌÏËÁÌØÎÏÊ ÓÅÔÉ, ÉÓÐÏÌØÚÕÑ ÐÒÏÔÏËÏÌ TCP/IP. Samba ÎÅ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ ÉÓÐÏÌØÚÕÑ ÄÒÕÇÉÅ ÓÅÔÅ×ÙÅ ÐÒÏÔÏËÏÌÙ. üÔÏ × ÏÂÝÅÍ ÌÅÇËÏ, ÐÏÓËÏÌØËÕ Linux É Windows 95/98/NT ÐÏÓÔÁ×ÌÑÀÔÓÑ Ó ÐÏÄÄÅÒÖËÏÊ TCP/IP. ïÄÎÁËÏ ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ ÍÁÛÉÎÙ Ó Windows 3.X, ÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÄÏÂÁ×ÉÔ ÐÏÄÄÅÒÖËÕ TCP/IP.
óÅÒ×ÉÓÙ SMB ÎÅ ÍÏÇÕÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÙ ÚÁ ÐÒÅÄÅÌÁÍÉ ÍÁÒÛÒÕÔÉÚÁÔÏÒÏ×. åÓÌÉ ×Ù ÈÏÔÉÔÅ ÓÄÅÌÁÔØ ÞÔÏ-ÔÏ ÐÏÄÏÂÎÏÅ, ÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÎÁÓÔÒÏÉÔØ ÔÕÎÎÅÌØ IP, ÞÔÏ ÎÅ Ñ×ÌÑÅÔÓÑ ÐÒÅÄÍÅÔÏÍ ÒÁÓÓÍÏÔÒÅÎÉÑ ÜÔÏÇÏ ÄÏËÕÍÅÎÔÁ.
äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÐÏÌÕÞÉÔØ ÉÓÈÏÄÎÙÅ ÔÅËÓÔÙ ÐÏÓÌÅÄÎÅÊ ×ÅÒÓÉÉ Samba, Ó×ÑÖÉÔÅ Ó ÕËÁÚÁÎÎÙÍ URL É ×ÙÂÅÒÉÔÅ ÂÌÉÖÁÊÛÉÊ Ë ×ÁÍ ÓÅÒ×ÅÒ-ÚÅÒËÁÌÏ: ftp://ftp.samba.org/.
ïÄÎÁËÏ, ÅÓÌÉ Õ ×ÁÓ ÕÓÔÁÎÏ×ÌÅÎ ÄÉÓÔÒÉÂÕÔÉ× RedHat Linux, Õ ×ÁÓ ÉÍÅÅÔÓÑ ×ÏÚÍÏÖÎÏÓÔØ ÕÓÔÁÎÏ×ÉÔØ ÅÅ ËÁË ÐÁËÅÔ RedHat. îÅËÏÔÏÒÙÅ ÄÒÕÇÉÅ ÄÉÓÔÒÉÂÕÔÉ×Ù ÔÁËÖÅ ×ËÌÀÞÁÀÔ ÉÓÐÏÌÎÑÅÍÙÅ ÆÁÊÌÙ Samba.
óÌÅÄÕÀÝÉÅ Ä×Á ÄÅÍÏÎÁ ÎÅÏÂÈÏÄÉÍÙ ÄÌÑ ÒÁÂÏÔÙ ÐÁËÅÔÁ Samba. ïÎÉ ÏÂÙÞÎÏ ÕÓÔÁÎÁ×ÌÉ×ÁÀÔÓÑ × /usr/sbin É ÚÁÐÕÓËÁÀÔÓÑ ÌÉÂÏ ÐÒÉ ÚÁÇÒÕÚËÅ ÉÚ ÓÉÓÔÅÍÎÙÈ ÓËÒÉÐÔÏ×, ÌÉÂÏ ÉÚ inetd. ðÒÉÍÅÒÙ ÓËÒÉÐÔÏ× ÄÁÎÙ × ÒÁÚÄÅÌÅ úÁÐÕÓË ÄÅÍÏÎÏ×.
smbd (äÅÍÏÎ SMB) nmbd (ïÂÅÓÐÅÞÉ×ÁÅÔ ÐÏÄÄÅÒÖËÕ ÓÅÒ×ÅÒÁ ÉÍÅÎ NetBIOS ÄÌÑ ËÌÉÅÎÔÏ×)
úÁÍÅÔÉÍ, ÞÔÏ ÓÅÒ×ÉÓ ÉÍÅÎ, ÐÒÅÄÏÓÔÁ×ÌÑÅÍÙÊ ÄÅÍÏÎÏÍ nmbd Ñ×ÌÑÅÔÓÑ ÏÔÌÉÞÎÙÍ ÏÔ ÓÅÒ×ÉÓÁ ÉÍÅÎ, ÐÒÅÄÏÓÔÁ×ÌÑÅÍÏÇÏ Domain Name Service (DNS). óÅÒ×ÉÓ ÉÍÅÎ NetBIOS Ñ×ÌÑÅÔÓÑ ÓÅÒ×ÉÓÏÍ ÉÍÅÎ × ÓÔÉÌÅ Windows, ÉÓÐÏÌØÚÕÅÍÙÍ ÄÌÑ SMB. äÒÕÇÉÍÉ ÓÌÏ×ÁÍÉ, ÉÍÅÀÝÉÊÓÑ ÓÅÒ×ÉÓ ÉÍÅÎ DNS ÎÉÞÅÇÏ ÎÅ ÓËÁÖÅÔ Ï ×ÏÚÍÏÖÎÏÓÔÉ Samba ÄÌÑ ÎÁÈÏÖÄÅÎÉÑ ÉÍÅÎ ÍÁÛÉÎ.
ïÂÙÞÎÏ ÓÌÅÄÕÀÝÉÅ Ä×ÏÉÞÎÙÅ ÆÁÊÌÙ Samba ÕÓÔÁÎÁ×ÌÉ×ÁÀÔÓÑ × ÄÉÒÅËÔÏÒÉÀ /usr/bin, ÈÏÔÑ ÉÈ ÒÁÓÐÏÌÏÖÅÎÉÅ ÏÐÃÉÏÎÁÌØÎÏ.
smbclient (ëÌÉÅÎÔ SMB ÄÌÑ UNIX-ÍÁÛÉÎ) smbprint (ÓËÒÉÐÔ ÄÌÑ ÐÅÞÁÔÉ ÎÁ ÐÒÉÎÔÅÒ ÎÁ SMB-ÍÁÛÉÎÅ) smbprint.sysv (ÔÁËÏÅ ËÁË ×ÙÛÅ, ÎÏ ÄÌÑ ÍÁÛÉÎ Ó SVR4 UNIX) smbstatus (ðÅÒÅÞÉÓÌÑÅÔ ÔÅËÕÝÉÅ SMB-ÓÏÅÄÉÎÅÎÉÑ ÄÌÑ ÌÏËÁÌØÎÏÊ ÍÁÛÉÎÙ) smbrun ('glue' ÓËÒÉÐÔ ÄÌÑ ÚÁÐÕÓËÁ ÐÒÉÌÏÖÅÎÉÊ ÎÁ SMB-ÍÁÛÉÎÅ)
ä×ÏÉÞÎÙÅ ÆÁÊÌÙ ÏÔÎÏÓÑÝÉÅÓÑ Ë ÐÏÄÄÅÒÖËÅ ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÙ smbfs ÏÂÓÕÖÄÁÀÔÓÑ ÄÁÌÅÅ × ÜÔÏÍ ÄÏËÕÍÅÎÔÅ.
äÏÐÏÌÎÉÔÅÌØÎÏ Ó ÜÔÉÍ ÄÏËÕÍÅÎÔÏÍ ×ËÌÀÞÅÎ ÓËÒÉÐÔ, ÎÁÚ×ÁÎÎÙÊ 'print', ËÏÔÏÒÙÊ ÓÌÕÖÉÔ ËÁË ÐÏÌÅÚÎÁÑ ÎÁÄÓÔÒÏÊËÁ ÎÁÄ ÓËÒÉÐÔÏÍ smbprint.
ðÁËÅÔ Samba ÏÞÅÎØ ÐÒÏÓÔ × ÕÓÔÁÎÏ×ËÅ. ðÒÏÓÔÏ ÐÏÌÕÞÉÔÅ ÉÓÈÏÄÎÙÅ ÔÅËÓÔÙ ÐÏ ÁÄÒÅÓÕ, ÕËÁÚÁÎÎÏÍÕ ×ÙÛÅ, É ÐÒÏÞÉÔÁÊÔÅ ÆÁÊÌ README × ÄÉÓÔÒÉÂÕÔÉ×Å. ôÁËÖÅ × ÄÉÓÔÒÉÂÕÔÉ×Å ÅÓÔØ ÆÁÊÌ ÎÁÚÙ×ÁÅÍÙÊ docs/INSTALL.txt, ËÏÔÏÒÙÊ ÄÁÅÔ ÐÒÏÓÔÏÊ ÎÁÂÏÒ ÐÏÛÁÇÏ×ÙÈ ÉÎÓÔÒÕËÃÉÊ.
ðÏÓÌÅÄÕÀÝÁÑ ÕÓÔÁÎÏ×ËÁ, ÐÏÍÅÓÔÉÔ ÄÅÍÏÎÙ × /usr/sbin É Ä×ÏÉÞÎÙÅ ÆÁÊÌÙ × /usr/bin. õÓÔÁÎÏ×ÉÔÅ ÓÐÒÁ×ÏÞÎÙÅ ÓÔÒÁÎÉÃÙ × /usr/local/man.
ðÒÉ ÕÓÔÁÎÏ×ËÅ ÐÁËÅÔÁ Samba, ×Ù ÄÏÌÖÎÙ ÕËÁÚÁÔØ × Makefile ÒÁÓÐÏÌÏÖÅÎÉÅ ÆÁÊÌÁ
ËÏÎÆÉÇÕÒÁÃÉÉ, smb.conf. ïÂÙÞÎÏ ÜÔÏ /etc, ÎÏ ×Ù
ÍÏÖÅÔÅ ÐÏÍÅÓÔÉÔØ ÅÇÏ ËÕÄÁ ÕÇÏÄÎÏ. äÌÑ ÜÔÉÈ ÕËÁÚÁÎÉÊ, ÍÙ ÂÕÄÅÍ ÐÒÅÄÐÏÌÁÇÁÔØ,
ÞÔÏ ×Ù ÕËÁÚÁÌÉ ÒÁÓÐÏÌÏÖÅÎÉÅ ÆÁÊÌÁ ËÏÎÆÉÇÕÒÁÃÉÉ ËÁË
/etc/smb.conf, ÒÁÓÐÏÌÏÖÅÎÉÅ ÆÁÊÌÁ ÐÒÏÔÏËÏÌÁ ËÁË log file =
/var/log/samba-log.%m
É ÂÌÏËÉÒÏ×ÏÞÎÏÊ ÄÉÒÅËÔÏÒÉÉ ËÁË lock
directory = /var/lock/samba
.
õÓÔÁÎÏ×ÉÔÅ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ smb.conf. ðÅÒÅÊÄÉÔÅ × ÄÉÒÅËÔÏÒÉÀ, ÇÄÅ ÂÙÌÁ ÓËÏÍÐÉÌÉÒÏ×ÁÎÁ Samba. ðÏÓÍÏÔÒÉÔÅ × ÐÏÄÄÉÒÅËÔÏÒÉÉ examples/simple É ÐÒÏÞÉÔÁÊÔÅ ÆÁÊÌ README. óËÏÐÉÒÕÊÔÅ ÆÁÊÌ smb.conf ÎÁÊÄÅÎÎÙÊ × ÜÔÏÊ ÄÉÒÅËÔÏÒÉÉ × ÄÉÒÅËÔÏÒÉÀ /etc. âõäøôå ïóôïòïöîù! åÓÌÉ Õ ×ÁÓ ÄÉÓÔÒÉÂÕÔÉ× Linux Ó ÕÖÅ ÕÓÔÁÎÏ×ÌÅÎÎÏÊ Samba, Õ ×ÁÓ ÕÖÅ ÍÏÖÅÔ ÂÙÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ Samba × /etc. ÷ÅÒÏÑÔÎÏ ×Ù ÍÏÖÅÔÅ ÎÁÞÁÔØ ÒÁÂÏÔÁÔØ Ó ËÁËÉÍ-ÔÏ ÉÚ ÎÉÈ.
åÓÌÉ ×Ù ÎÅ ÈÏÔÉÔÅ ÕÓÔÁÎÁ×ÌÉ×ÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ × ÄÉÒÅËÔÏÒÉÀ /etc, ÔÏ ÐÏÍÅÓÔÉÔÅ ÅÇÏ ËÕÄÁ ×Ù ÈÏÔÉÔÅ, Á ÚÁÔÅÍ ÐÏÍÅÓÔÉÔÅ ÓÉÍ×ÏÌÉÞÅÓËÕÀ ÓÓÙÌËÕ ÎÁ ÎÅÇÏ × ÄÉÒÅËÔÏÒÉÀ /etc:
ln -s /path/to/smb.conf /etc/smb.conf
åÓÔØ Ä×Á ÄÅÍÏÎÁ SMB /usr/sbin/smbd É /usr/sbin/nmbd.
÷Ù ÍÏÖÅÔÅ ÚÁÐÕÓÔÉÔØ ÄÅÍÏÎÙ Samba ÉÚ inetd ÉÌÉ ËÁË Á×ÔÏÎÏÍÎÙÅ ÐÒÏÃÅÓÓÙ. Samba ÂÕÄÅÔ ÏÔ×ÅÞÁÔØ ÞÕÔØ ÂÙÓÔÒÅÅ ËÏÇÄÁ ÏÎÁ ÚÁÐÕÝÅÎÁ ËÁË Á×ÔÏÎÏÍÎÙÊ ÐÒÏÃÅÓÓ, ÞÅÍ × ÓÌÕÞÁÅ ËÏÇÄÁ ÏÎÁ ÚÁÐÕÓËÁÅÔÓÑ ÉÚ inetd.
÷ ÎÅËÏÔÏÒÙÈ ÓÌÕÞÁÑÈ ×Ù ÄÏÌÖÎÙ ÐÒÏ×ÅÒÉÔØ ÎÁÌÉÞÉÅ × ÆÁÊÌÅ /etc/services ÐÒÉÍÅÒÎÏ ÔÁËÉÈ ÓÔÒÏË:
netbios-ns 137/tcp nbns
netbios-ns 137/udp nbns
netbios-dgm 138/tcp nbdgm
netbios-dgm 138/udp nbdgm
netbios-ssn 139/tcp nbssn
õÂÅÄÉÔÅÓØ, ÞÔÏ ×ÓÅ ÏÎÉ ÎÅ ÚÁËÏÍÅÎÔÉÒÏ×ÁÎÙ. ÷ ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ×ÁÛÅÇÏ ÄÉÓÔÒÉÂÕÔÉ×Á, ×ÁÍ ÍÏÖÅÔ ÄÁÖÅ ÎÕÖÎÏ ÂÕÄÅÔ ÄÏÂÁ×ÉÔØ ÉÈ × ÜÔÏÔ ÆÁÊÌ. Samba ÎÅ ÓÍÏÖÅÔ ÐÒÉ×ÑÚÁÔØÓÑ Ë ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÍ ÐÏÒÔÁÍ ÐÏËÁ ÜÔÉÈ ÓÔÒÏË ÎÅ ÂÕÄÅÔ × ÆÁÊÌÅ /etc/services.
äÌÑ ÚÁÐÕÓËÁ ÄÅÍÏÎÏ× ÉÚ inetd, ÐÏÍÅÓÔÉÔÅ ÓÌÅÄÕÀÝÉÅ ÓÔÒÏËÉ × ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ inetd, /etc/inetd.conf:
# SAMBA NetBIOS services (for PC file and print sharing)
netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd
úÁÔÅÍ ÐÅÒÅÚÁÐÕÓÔÉÔÅ ÄÅÍÏÎ inetd ×ÙÐÏÌÎÉ× ËÏÍÁÎÄÕ:
kill -HUP 1 `cat /var/run/inetd.pid`
äÌÑ ÚÁÐÕÓËÁ ÄÅÍÏÎÏ× ÉÚ ÓÉÓÔÅÍÎÙÈ ÓÔÁÒÔÏ×ÙÈ ÓËÒÉÐÔÏ×, ÐÏÍÅÓÔÉÔÅ ÓÌÅÄÕÀÝÉÊ ÓËÒÉÐÔ × ÆÁÊÌ /etc/rc.d/init.d/smb (ÄÌÑ ÄÉÓÔÒÉÂÕÔÉ×Á RedHat) É ÓÏÚÄÁÊÔÅ ÎÁ ÎÅÇÏ ÓÉÍ×ÏÌÉÞÅÓËÉÅ ÓÓÙÌËÉ Ó ÉÍÅÎÁÍÉ ÕËÁÚÁÎÎÙÍÉ × ËÏÍÍÅÎÔÁÒÉÑÈ:
#!/bin/sh
#
# /etc/rc.d/init.d/smb - ÚÁÐÕÓËÁÅÔ É ÏÓÔÁÎÁ×ÌÉ×ÁÅÔ ÓÅÒ×ÉÓÙ SMB
#
# óÌÅÄÕÀÝÉÅ ÆÁÊÌÙ ÄÏÌÖÎÙ ÂÙÔØ ÓÉÍ×ÏÌÉÞÅÓËÉÍÉ ÓÓÙÌËÁÍÉ ÎÁ ÜÔÏÔ ÆÁÊÌ:
# symlinks:
# /etc/rc.d/rc1.d/K35smb (õÂÉ×ÁÅÔ ÓÅÒ×ÉÓÙ SMB ÐÒÉ ×ÙËÌÀÞÅÎÉÉ
# /etc/rc.d/rc3.d/S91smb (úÁÐÕÓËÁÅÔ ÓÅÒ×ÉÓÙ SMB × ÍÎÏÇÏÐÏÌØÚÏ×ÁÔÅÌØÓËÏÍ ÒÅÖÉÍÅ)
# /etc/rc.d/rc6.d/K35smb (õÂÉ×ÁÅÔ ÓÅÒ×ÉÓÙ SMB ÐÒÉ ÐÅÒÅÚÁÇÒÕÚËÅ)
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting SMB services: "
daemon smbd -D
daemon nmbd -D
echo
touch /var/lock/subsys/smb
;;
stop)
echo -n "Shutting down SMB services: "
killproc smbd
killproc nmbd
rm -f /var/lock/subsys/smb
echo ""
;;
*)
echo "Usage: smb {start|stop}"
exit 1
esac
åÓÌÉ ÐÒÉ ÓÔÁÒÔÅ Samba ×Ù ÐÏÌÕÞÁÅÔÅ ÓÏÏÂÝÅÎÉÅ × ËÏÔÏÒÏÍ ÇÏ×ÏÒÉÔÓÑ, ÞÔÏ ÄÅÍÏÎ ÎÅ ÍÏÖÅÔ ÐÏÄËÌÀÞÉÔÓÑ Ë ÐÏÒÔÕ 139, ÔÏ ×ÅÒÏÑÔÎÏ Õ ×ÁÓ ÕÖÅ ÅÓÔØ ÚÁÐÕÝÅÎÎÙÅ ÐÒÏÃÅÓÓÙ Samba, ËÏÔÏÒÙÅ ÎÅ ÂÙÌÉ ÚÁ×ÅÒÛÅÎÙ. ðÏÓÍÏÔÒÉÔÅ ÓÐÉÓÏË ÐÒÏÃÅÓÓÏ× (ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ 'ps auxww | grep mbd') ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÏÐÒÅÄÅÌÉÔØ ÅÓÔØ ÌÉ ÅÝÅ ÚÁÐÕÝÅÎÎÙÅ ÓÅÒ×ÉÓÙ Samba.
îÁÓÔÒÏÊËÁ Samba × Linux (ÉÌÉ ÄÒÕÇÉÈ UNIX-ÍÁÛÉÎÁÈ) ËÏÎÔÒÏÌÉÒÕÅÔÓÑ ÅÄÉÎÓÔ×ÅÎÎÙÍ ÆÁÊÌÏÍ, /etc/smb.conf. üÔÏÔ ÆÁÊÌ ÏÐÒÅÄÅÌÑÅÔ Ë ËÁËÉÍ ÓÉÓÔÅÍÎÙÍ ÒÅÓÕÒÓÁÍ ×Ù ÈÏÔÉÔÅ ÄÁÔØ ÄÏÓÔÕÐ ÄÌÑ ×ÎÅÛÎÅÇÏ ÍÉÒÁ É ËÁËÉÅ ÏÇÒÁÎÉÞÅÎÉÑ ×Ù ÈÏÔÉÔÅ ÄÁÔØ ÎÁ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÜÔÉÈ ÒÅÓÕÒÓÏ×.
ôÁË ËÁË ÓÌÅÄÕÀÝÉÅ ÒÁÚÄÅÌÙ ÐÏÓ×ÑÝÅÎÙ ÏÒÇÁÎÉÚÁÃÉÉ ÄÏÓÔÕÐÁ Ë ÄÉÓËÁÍ É ÐÒÉÎÔÅÒÁÍ Linux ÄÌÑ Windows-ÍÁÛÉÎ, ÔÏ ÆÁÊÌ smb.conf, ÐÏËÁÚÁÎÎÙÊ × ÜÔÏÍ ÒÁÚÄÅÌÅ Ñ×ÌÑÅÔÓÑ ÐÒÉÍÅÒÏÍ, ÉÓËÌÀÞÉÔÅÌØÎÏ × ÃÅÌÑÈ ××ÅÄÅÎÉÑ.
îÅ ÂÅÓÐÏËÏÊÔÅÓØ ÓÅÊÞÁÓ Ï ÄÅÔÁÌÑÈ. óÌÅÄÕÀÝÉÅ ÒÁÚÄÅÌÙ ××ÅÄÕÔ ÏÓÎÏ×ÎÙÅ ËÏÎÃÅÐÃÉÉ.
ëÁÖÄÙÊ ÒÁÚÄÅÌ ÆÁÊÌÁ ÎÁÞÉÎÁÅÔÓÑ Ó ÚÁÇÏÌÏ×ËÁ ÒÁÚÄÅÌÁ, ÔÁËÏÇÏ ËÁË [global], [homes], [printers], É Ô.Ð..
óÅËÃÉÑ [global] ÏÐÒÅÄÅÌÑÅÔ ÎÅËÏÔÏÒÙÅ ÐÅÒÅÍÅÎÎÙÅ, ËÏÔÏÒÙÅ Samba ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÄÌÑ ÏÐÒÅÄÅÌÅÎÉÑ ÄÏÓÔÕÐÁ ËÏ ×ÓÅÍ ÒÅÓÕÒÓÁÍ.
òÁÚÄÅÌ [homes] ÐÏÚ×ÏÌÑÅÔ ÕÄÁÌÅÎÎÙÍ ÐÏÌØÚÏ×ÁÔÅÌÑÍ ÉÍÅÔØ ÄÏÓÔÕÐ Ë Ó×ÏÉÍ (É ÔÏÌØËÏ Ó×ÏÉÍ) ÄÏÍÁÛÎÉÍ ÄÉÒÅËÔÏÒÉÑÍ ÎÁ ÌÏËÁÌØÎÏÊ Linux-ÍÁÛÉÎÅ. ôÁË ÞÔÏ, ÅÓÌÉ ÐÏÌØÚÏ×ÁÔÅÌÉ Windows ÐÏÐÙÔÁÀÔÓÑ ÐÏÄËÌÀÞÉÔØÓÑ Ë ÜÔÏÍÕ ÒÁÚÄÅÌÕ ÓÏ Ó×ÏÉÈ Windows-ÍÁÛÉÎ, ÔÏ ÏÎÉ ÂÕÄÕÔ ÐÏÄËÌÀÞÅÎÙ Ë Ó×ÏÉÍ ÐÅÒÓÏÎÁÌØÎÙÍ ÄÏÍÁÛÎÉÍ ÄÉÒÅËÔÏÒÉÑÍ. úÁÍÅÔÉÍ, ÞÔÏ ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÓÄÅÌÁÔØ ÜÔÏ, ÏÎÉ ÄÏÌÖÎÙ ÂÙÔØ ÚÁÒÅÇÉÓÔÒÉÒÏ×ÁÎÙ ÎÁ Linux-ÍÁÛÉÎÅ.
ðÒÏÓÔÏÊ ÆÁÊÌ smb.conf, ÐÒÉ×ÅÄÅÎÎÙÊ ÎÉÖÅ, ÐÏÚ×ÏÌÑÅÔ ÕÄÁÌÅÎÎÙÍ ÐÏÌØÚÏ×ÁÔÅÌÑÍ ÉÍÅÔØ ÄÏÓÔÕÐ Ë ÉÈ ÄÏÍÁÛÎÉÍ ÄÉÒÅËÔÏÒÉÑÍ ÎÁ ÌÏËÁÌØÎÏÊ ÍÁÛÉÎÅ É ÐÉÓÁÔØ ×Ï ×ÒÅÍÅÎÎÕÀ ÄÉÒÅËÔÏÒÉÀ. äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÐÏÌØÚÏ×ÁÔÅÌÉ Windows ÍÏÇÌÉ Õ×ÉÄÅÔØ ÜÔÉ ÒÅÓÕÒÓÙ ÍÁÛÉÎÁ Ó Linux ÄÏÌÖÎÁ ÂÙÔØ × ÌÏËÁÌØÎÏÊ ÓÅÔÉ. úÁÔÅÍ ÐÏÌØÚÏ×ÁÔÅÌÉ ÐÒÏÓÔÏ ÐÏÄËÌÀÞÁÀÔ ÓÅÔÅ×ÙÅ ÄÉÓËÉ Ó ÐÏÍÏÝØÀ Windows File Manager ÉÌÉ Windows Explorer.
úÁÍÅÔÉÍ, ÞÔÏ × ÓÌÅÄÕÀÝÉÈ ÒÁÚÄÅÌÁÈ ÂÕÄÕÔ ÄÁÎÙ ÄÏÐÏÌÎÉÔÅÌØÎÙÅ ÚÁÐÉÓÉ ÄÌÑ ÜÔÏÇÏ ÆÁÊÌÁ, ÞÔÏÂÙ ÄÁÔØ ÄÏÓÔÕÐ Ë ÂÏÌØÛÅÍÕ ËÏÌÉÞÅÓÔ×Õ ÒÅÓÕÒÓÏ×.
; /etc/smb.conf
;
; õÂÅÄÉÔÅÓØ É ÐÅÒÅÚÁÐÕÓÔÉÔÅ ÓÅÒ×ÅÒ ÐÏÓÌÅ ×ÎÅÓÅÎÉÑ ÉÚÍÅÎÅÎÉÊ × ÜÔÏÔ
; ÆÁÊÌ, ÎÁÐÒÉÍÅÒ:
; /etc/rc.d/init.d/smb stop
; /etc/rc.d/init.d/smb start
[global]
; òÁÓËÏÍÍÅÎÔÉÒÕÊÔÅ ÜÔÕ ÓÔÒÏËÕ, ÅÓÌÉ ×Ù ÈÏÔÉÔÅ ÄÁÔØ ÄÏÓÔÕÐ ÐÏÌØÚÏ×ÁÔÅÌÀ "ÇÏÓÔØ"
; guest account = nobody
log file = /var/log/samba-log.%m
lock directory = /var/lock/samba
share modes = yes
[homes]
comment = Home Directories
browseable = no
read only = no
create mode = 0750
[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes
îÁÐÉÓÁ× ÎÏ×ÙÊ ÆÁÊÌ smb.conf, ÐÏÌÅÚÎÏ ÐÒÏ×ÅÒÉÔØ ÅÇÏ ÐÒÁ×ÉÌØÎÏÓÔØ. ÷Ù ÍÏÖÅÔÅ ÐÒÏ×ÅÒÉÔØ ÐÒÁ×ÉÌØÎÏÓÔØ ÎÁÐÉÓÁÎÉÑ ÆÁÊÌÁ smb.conf, ÉÓÐÏÌØÚÕÑ ÕÔÉÌÉÔÕ 'testparm' (ÓÐÒÁ×ÏÞÎÁÑ ÓÔÒÁÎÉÃÁ: testparm); ÅÓÌÉ testparm ÓÏÏÂÝÁÅÔ Ï ÏÔÓÕÔÓÔ×ÉÉ ÐÒÏÂÌÅÍ, ÔÏ smbd ÐÒÁ×ÉÌØÎÏ ÚÁÇÒÕÚÉÔ ÆÁÊÌ ÎÁÓÔÒÏÅË.
ðÏÌÅÚÎÙÊ ÔÒÀË: åÓÌÉ ×ÁÛ ÓÅÒ×ÅÒ Samba ÉÍÅÅÔ ÂÏÌØÛÅ ÏÄÎÏÇÏ ethernet ÉÎÔÅÒÆÅÊÓÁ, ÔÏ smbd ÍÏÖÅÔ ÐÏÄËÌÀÞÉÔÓÑ Ë ÎÅÐÒÁ×ÉÌØÎÏÍÕ. åÓÌÉ ÜÔÏ ÔÁË, ÞÔÏ ×Ù ÍÏÖÅÔÅ Ñ×ÎÏ ÚÁÓÔÁ×ÉÔ ÅÅ ÐÏÄËÌÀÞÁÔØÓÑ Ë ÎÕÖÎÏÍÕ ÄÏÂÁ×É× ÓÔÒÏËÕ × ÒÁÚÄÅÌ [global] ÆÁÊÌÁ /etc/smb.conf:
interfaces = 192.168.1.1/24
ôÁËÖÅ ÓÕÝÅÓÔ×ÕÅÔ GUI-ÕÔÉÌÉÔÁ ÄÌÑ ÎÁÓÔÒÏÊËÉ Samba: GtkSamba. óÍÏÔÒÉÔÅ ÓÔÒÁÎÉÃÕ ÐÏ ÁÄÒÅÓÕ http://www.open-systems.com/gtksamba.html.
ëÁË ÐÏËÁÚÁÎÏ ×ÙÛÅ × ÆÁÊÌÅ smb.conf, ÏÒÇÁÎÉÚÁÃÉÑ ÄÏÓÔÕÐÁ Ë ÄÉÓËÁÍ Linux ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÅÊ Windows Ñ×ÌÑÅÔÓÑ ÄÏ×ÏÌØÎÏ ÐÒÏÓÔÙÍ ÄÅÌÏÍ. ïÄÎÁËÏ, Ó ÐÏÍÏÝØÀ Samba ×Ù ÍÏÖÅÔÅ ËÏÎÔÒÏÌÉÒÏ×ÁÔØ ÜÔÏ × ÂÏÌØÛÏÊ ÓÔÅÐÅÎÉ. úÄÅÓØ ÍÙ ÐÒÉ×ÅÄÅÍ ÎÅÓËÏÌØËÏ ÐÒÉÍÅÒÏ×:
þÔÏÂÙ ÏÒÇÁÎÉÚÏ×ÁÔØ ÄÏÓÔÕÐ ÄÌÑ ×ÓÅÈ, ÓÏÚÄÁÊÔÅ ËÏÐÉÀ ÒÁÚÄÅÌÁ [tmp], ÐÒÉ×ÅÄÅÎÎÏÇÏ ×ÙÛÅ, ÄÏÂÁ×É× ÞÔÏ-ÔÏ ÐÏÄÏÂÎÏÅ × smb.conf:
[public]
comment = Public Stuff
path = /home/public
public = yes
writable = yes
printable = no
÷Ù ÓÅÊÞÁÓ ÂÕÄÅÔÅ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ ÚÁÐÕÓÔÉÔØ Samba É ÐÒÏÓÍÏÔÒÅÔØ ÄÏÓÔÕÐÎÙÅ ÒÅÓÕÒÓÙ Ó Windows PC. ïÄÎÁËÏ, ÎÅÄÁ×ÎÏ Microsoft ÓÄÅÌÁÌÁ ÖÉÚÎØ ÎÅÍÎÏÇÏ ÂÏÌÅÅ ÔÒÕÄÎÏÊ ÄÌÑ ÔÅÈ, ËÔÏ ÉÓÐÏÌØÚÕÅÔ Samba. Windows 98, Windows NT (service pack 3 ÉÌÉ ×ÙÛÅ) É ÐÏÚÄÎÉÅ ×ÅÒÓÉÉ Windows 95 ÔÅÐÅÒØ ÐÏ ÕÍÏÌÞÁÎÉÀ ÉÓÐÏÌØÚÕÀÔ ÛÉÆÒÏ×ÁÎÎÙÅ ÐÁÒÏÌÉ. á Samba ÐÏ ÕÍÏÌÞÁÎÉÀ ÉÓÐÏÌØÚÕÅÔ ÎÅÛÉÆÒÏ×ÁÎÎÙÅ ÐÁÒÏÌÉ. ÷Ù ÎÅ ÓÍÏÖÅÔÅ ÐÒÏÓÍÁÔÒÉ×ÁÔØ ÓÏÄÅÒÖÉÍÏÅ ÓÅÒ×ÅÒÏ× ËÏÇÄÁ ÌÉÂÏ ËÌÉÅÎÔ ÌÉÂÏ ÓÅÒ×ÅÒ ÉÓÐÏÌØÚÕÀÔ ÛÉÆÒÏ×ÁÎÎÙÅ ÐÁÒÏÌÉ, ÐÏÔÏÍÕ ÞÔÏ ÓÏÅÄÉÎÅÎÉÅ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÓÄÅÌÁÎÏ ÂÅÚ ÒÅÇÉÓÔÒÁÃÉÉ.
åÓÌÉ Õ ×ÁÓ ÅÓÔØ ÎÅÓÏÏÔ×ÅÔÓÔ×ÉÅ ÔÉÐÏ× ÐÁÒÏÌÅÊ ÍÅÖÄÕ ËÌÉÅÎÔÏÍ É ÓÅÒ×ÅÒÏÍ É ËÏÇÄÁ ×Ù ÐÙÔÁÅÔÅÓØ ÐÏÄËÌÀÞÉÔÓÑ Ë ÒÅÓÕÒÓÕ, ÔÏ ×Ù ÍÏÖÅÔÅ Õ×ÉÄÅÔØ ÏËÎÏ ÄÉÁÌÏÇÁ × ËÏÔÏÒÏÍ ÂÕÄÅÔ ÓËÁÚÁÎÏ ÐÒÉÍÅÒÎÏ ÓÌÅÄÕÀÝÅÅ: "You are not authorized to access that account from this machine".
÷Ù ÍÏÖÅÔÅ ÌÉÂÏ ÎÁÓÔÒÏÉÔØ Samba-ÓÅÒ×ÅÒ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÛÉÆÒÏ×ÁÎÎÙÈ ÐÁÒÏÌÅÊ, ÌÉÂÏ ÎÁÓÔÒÏÉÔØ ÍÁÛÉÎÙ Ó Windows, ÞÔÏÂÙ ÏÎÉ ÉÓÐÏÌØÚÏ×ÁÌÉ ÎÅÛÉÆÒÏ×ÁÎÎÙÅ ÐÁÒÏÌÉ.
äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÚÁÓÔÁ×ÉÔØ Windows ÒÁÂÏÔÁÔØ Ó ÎÅÛÉÆÒÏ×ÁÎÎÙÍÉ ÐÁÒÏÌÑÍÉ SMB:
Windows 95/98 =============
éÓÐÏÌØÚÕÑ ÒÅÄÁËÔÏÒ registry (regedit), ÓÏÚÄÁÊÔÅ ËÌÀÞ registry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP äÏÂÁ×ØÔÅ ÚÎÁÞÅÎÉÅ ÔÉÐÁ DWORD: éÍÑ ÚÎÁÞÅÎÉÑ: EnablePlainTextPassword äÁÎÎÙÅ: 0x01.
Windows NT ==========
éÓÐÏÌØÚÕÑ ÒÅÄÁËÔÏÒ registry (regedit), ÓÏÚÄÁÊÔÅ ËÌÀÞ registry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rdr\Parameters äÏÂÁ×ØÔÅ ÚÎÁÞÅÎÉÅ ÔÉÐÁ DWORD: éÍÑ ÚÎÁÞÅÎÉÑ: EnablePlainTextPassword úÎÁÞÅÎÉÅ: 0x01
ðÏÓÌÅ ÔÏÇÏ, ËÁË ×Ù ÓÄÅÌÁÌÉ ÜÔÉ ÉÚÍÅÎÅÎÉÑ, ÐÅÒÅÚÁÇÒÕÚÉÔÅ ÍÁÛÉÎÕ Ó Windows É ÐÏÐÙÔÁÊÔÅÓØ ÐÏÄËÌÀÞÉÔØ ÓÅÔÅ×ÏÊ ÄÉÓË Ë ÓÅÒ×ÅÒÕ Samba. üÔÏ ÄÏÌÖÎÏ ÒÁÂÏÔÁÔØ, ÐÏÓËÏÌØËÕ ÓÅÒ×ÅÒ Samba ÉÓÐÏÌØÚÕÅÔ ÐÁÒÏÌÉ × ÎÅÛÉÆÒÏ×ÁÎÎÏÍ ×ÉÄÅ.
äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÎÁÓÔÒÏÉÔØ Samba ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÛÉÆÒÏ×ÁÎÎÙÈ ÐÁÒÏÌÅÊ:
÷ ÒÁÚÄÅÌ [global] ÆÁÊÌÁ /etc/smb.conf, ÄÏÂÁ×ØÔÅ ÓÌÅÄÕÀÝÉÅ ÓÔÒÏËÉ:
encrypt passwords = yes
smb passwd file = /etc/smbpasswd
íÙ ×ÁÍ ÎÁÓÔÏÑÔÅÌØÎÏ ÒÅËÏÍÅÎÄÕÅÍ ÐÒÏÞÉÔÁÔØ ÆÁÊÌÙ ENCRYPTION.txt, Win95.txt É WinNT.txt × ÄÏËÕÍÅÎÔÁÃÉÉ ÐÏ Samba ÄÏ ÔÏÇÏ ËÁË ×Ù ÂÕÄÅÔÅ ÄÅÌÁÔØ ÜÔÏ!
åÓÌÉ ×ÁÛÉ É ËÌÉÅÎÔÙ É ÓÅÒ×ÅÒ ÉÓÐÏÌØÚÕÀÔ ÛÉÆÒÏ×ÁÎÎÙÅ ÐÁÒÏÌÉ, ÔÏ ×Ù ÎÅ ÓÍÏÖÅÔÅ ÐÒÏÓÍÏÔÒÅÔØ ÓÐÉÓËÉ ÄÏÓÔÕÐÎÙÈ ÒÅÓÕÒÓÏ× ÄÏ ÔÅÈ ÐÏÒ ÐÏËÁ ÎÁÞÁÌØÎÏÅ ÓÏÅÄÉÎÅÎÉÅ ÎÅ ÂÕÄÅÔ ÓÄÅÌÁÎÏ Ó ÐÒÁ×ÉÌØÎÙÍÉ ÐÁÒÁÍÅÔÒÁÍÉ ×ÈÏÄÁ. äÌÑ ÔÏÇÏ ÞÔÏÂÙ ÓÄÅÌÁÔØ ÐÅÒ×ÏÎÁÞÁÌØÎÏÅ ÓÏÅÄÉÎÅÎÉÅ, ××ÅÄÉÔÅ ×ÒÕÞÎÕÀ ÉÍÑ ÒÅÓÕÒÓÁ × ÄÉÁÌÏÇÏ×ÏÍ ÏËÎÅ Windows File Manager ÉÌÉ Explorer, ÉÍÑ ÄÏÌÖÎÏ ÂÙÔØ × ÆÏÒÍÅ '\\<hostname>\<sharename>'. ðÏÄËÌÀÞÉÔÅÓØ Ë ÓÅÒ×ÅÒÕ É ÐÒÁ×ÉÌØÎÙÍÉ ÄÌÑ ÄÁÎÎÏÇÏ ÓÅÒ×ÅÒÁ ÉÍÅÎÅÍ É ÐÁÒÏÌÅÍ.
åÓÌÉ ×Ù ÐÏÄÏÚÒÅ×ÁÅÔÅ, ÞÔÏ ×ÁÛ ÓÅÒ×ÉÓ ÉÍÅÎ NetBIOS ÎÅÐÒÁ×ÉÌØÎÏ ÎÁÓÔÒÏÅÎ (×ÏÚÍÏÖÎÏ ÐÏÔÏÍÕ, ÞÔÏ ×Ù ÐÏÌÕÞÁÅÔÅ ÓÏÏÂÝÅÎÉÅ Ï ÏÛÉÂËÅ 'host not found (ÍÁÛÉÎÁ ÎÅ ÎÁÊÄÅÎÁ)' ÐÒÉ ÐÏÐÙÔËÅ ÐÏÄËÌÀÞÅÎÉÑ), ÔÏ ÐÏÐÙÔÁÊÔÅÓØ ÉÓÐÏÌØÚÏ×ÁÔØ IP-ÁÄÒÅÓ ÓÅÒ×ÅÒÁ: '\\<host ip address>\<sharename>'.
äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÉÍÅÎÁ ÏÔÏÂÒÁÖÁÌÉÓØ ÐÒÁ×ÉÌØÎÏ, ×Ù ÍÏÖÅÔ ÐÏÎÁÄÏÂÉÔØÓÑ ÕÓÔÁÎÏ×ÉÔØ ÎÅËÏÔÏÒÙÅ ÎÁÓÔÒÏÊËÉ × ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÍ ÒÁÚÄÅÌÅ ÒÅÓÕÒÓÁ. üÔÏ ÒÁÂÏÔÁÅÔ Ó ËÌÉÅÎÔÁÍÉ ÐÏÄ ÕÐÒÁ×ÌÅÎÉÅÍ 95/98/NT, ÎÏ ÍÏÖÅÔ ÂÙÔØ ÎÅÏÂÈÏÄÉÍÏ ÂÕÄÅÔ ÉÚÍÅÎÉÔØ ÜÔÉ ÎÁÓÔÒÏÊËÉ, ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ ËÌÉÅÎÔÏ× Ó Windows 3.X:
; Mangle case = yes seems to give the correct filenames
; for Win95/98/NT.
mangle case = yes
; If samba is case sensitive when looking for files
case sensitive = no
; Default case of files that are created
default case = lower
; Preserve case for all filenames
preserve case = yes
; Preserve case for dos (8.3) filenames
short preserve case = no
úÁÍÅÞÁÎÉÅ: úÎÁÞÅÎÉÅ ÐÏÓÌÅ ÚÎÁËÁ / ÜÔÏ ÓÓÙÌËÁ ÎÁ ÓÅÔÅ×ÕÀ ÍÁÓËÕ. äÌÑ ÓÅÔÉ ËÌÁÓÓÁ ó ÜÔÉÍ ÚÎÁÞÅÎÉÅÍ ÂÕÄÅÔ "24". äÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ Ï ÔÏÍ ËÁË ×ÙÐÏÌÎÑÔØ ×ÙÞÉÓÌÅÎÉÑ ÄÌÑ ÐÏÄÓÅÔÅÊ, ×Ù ÍÏÖÅÔÅ ÐÏÓÍÏÔÒÅÔØ ÉÎÆÏÒÍÁÃÉÀ ÐÏ ÁÄÒÅÓÕ http://www.ziplink.net/~ralphb/IPSubnet/index.html.
ëÏÎÅÞÎÏ ÎÁÓÔÒÏÊËÁ Samba ÂÏÌÅÅ ÐÏÌÎÁ, ÞÅÍ ÍÙ ÐÒÉ×ÅÌÉ ÚÄÅÓØ, ÎÏ ÜÔÏ ÄÁÓÔ ×ÁÍ ×ÏÚÍÏÖÎÏÓÔØ ÎÁÞÁÔØ ÒÁÂÏÔÁÔØ. åÓÌÉ ×Ù ÈÏÔÉÔÅ ÓÄÅÌÁÔØ ÞÔÏ-ÔÏ ÂÏÌÅÅ ÓÌÏÖÎÏÅ, ÔÏ Ñ ÒÅËÏÍÅÎÄÕÀ ×ÁÍ ÓÈÏÄÉÔØ ÎÁ ÓÅÒ×ÅÒ Samba, ÕÐÏÍÑÎÕÔÙÊ ×ÙÛÅ.
þÔÏÂÙ ÓÄÅÌÁÔØ ÜÔÕ ÄÉÒÅËÔÏÒÉÀ ÄÏÓÔÕÐÎÏÊ ÄÌÑ ÞÔÅÎÉÑ ×ÓÅÍÉ, ÎÏ ÒÁÚÒÅÛÉÔØ ÐÉÓÁÔØ × ÎÅÅ ÔÏÌØËÏ ÌÀÄÑÍ ÉÚ ÇÒÕÐÐÙ staff, ÉÚÍÅÎÉÔÅ ÚÁÐÉÓØ ËÁË ÐÏËÁÚÁÎÏ × ÓÌÅÄÕÀÝÅÍ ÐÒÉÍÅÒÕ:
[public]
comment = Public Stuff
path = /home/public
public = yes
writable = yes
printable = no
write list = @staff
äÌÑ ÏÐÉÓÁÎÉÑ ÄÒÕÇÉÈ ÐÒÉÅÍÏ× ÄÌÑ ÉÚÍÅÎÅÎÉÑ ÄÏÓÔÕÐÁ Ë ÄÉÓËÁÍ, ÓÍÏÔÒÉÔÅ ÄÏËÕÍÅÎÔÁÃÉÀ ÎÁ Samba É ÓÐÒÁ×ÏÞÎÙÅ ÓÔÒÁÎÉÃÙ.
ðÒÏÇÒÁÍÍÁ ËÌÉÅÎÔÁ SMB ÄÌÑ UNIX-ÍÁÛÉÎ ×ËÌÀÞÅÎÁ × ÄÉÓÔÒÉÂÕÔÉ× Samba. ïÎÁ ÏÂÅÓÐÅÞÉ×ÁÅÔ ftp-ÐÏÄÏÂÎÙÊ ÉÎÔÅÒÆÅÊÓ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÜÔÕ ÕÔÉÌÉÔÕ ÄÌÑ ÐÅÒÅÎÏÓÁ ÆÁÊÌÏ× ÍÅÖÄÕ 'ÓÅÒ×ÅÒÏÍ' ÐÏÄ ÕÐÒÁ×ÌÅÎÉÅÍ Windows É ËÌÉÅÎÔÏÍ ÐÏÄ Linux.
äÌÑ ÔÏÇÏ, ÞÔÏÂÙ Õ×ÉÄÅÔØ ËÁËÉÅ ÒÅÓÕÒÓÙ ÄÏÓÔÕÐÎÙ ÎÁ ÄÁÎÎÏÊ ÍÁÛÉÎÅ, ×ÙÐÏÌÎÉÔÅ ËÏÍÁÎÄÕ:
/usr/sbin/smbclient -L host
ÇÄÅ 'host' ÜÔÏ ÉÍÑ ÍÁÛÉÎÙ, ËÏÔÏÒÕÀ ×Ù ÈÏÔÉÔÅ ×ÉÄÅÔØ. üÔÁ ËÏÍÁÎÄÁ ×ÅÒÎÅÔ ÓÐÉÓÏË ÉÍÅÎ 'ÓÅÒ×ÉÓÏ×' - Ô.Å. ÉÍÅÎ ÄÉÓËÏ× ÉÌÉ ÐÒÉÎÔÅÒÏ× Ë ËÏÔÏÒÙÍ ÍÏÖÅÔ ÂÙÔØ ÐÏÌÕÞÅÎ ÄÏÓÔÕÐ. äÏ ÔÅÈ ÐÏÒ, ÐÏËÁ SMB ÓÅÒ×ÅÒ ÎÅ ÂÕÄÅÔ ÎÁÓÔÒÏÅÎ ÂÅÚ ÕÐÒÁ×ÌÅÎÉÑ ÄÏÓÔÕÐÏÍ, ÏÎ ÂÕÄÅÔ ÚÁÐÒÁÛÉ×ÁÔØ Õ ×ÁÓ ÐÁÒÏÌØ. ÷×ÅÄÉÔÅ × ÏÔ×ÅÔ ÎÁ ÚÁÐÒÏÓ ÐÁÒÏÌØ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ 'ÇÏÓÔØ (guest)' ÉÌÉ ×ÁÛ ÐÅÒÓÏÎÁÌØÎÙÊ ÐÁÒÏÌØ ÎÁ ÜÔÏÊ ÍÁÛÉÎÅ.
îÁÐÒÉÍÅÒ:
smbclient -L zimmerman
÷Ù×ÏÄ ÜÔÏÊ ËÏÍÁÎÄÙ ÄÏÌÖÅÎ ×ÙÇÌÑÄÅÔØ ÐÒÉÍÅÒÎÏ ÔÁË:
Server time is Sat Aug 10 15:58:27 1996
Timezone is UTC+10.0
Password:
Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
Server=[ZIMMERMAN] User=[] Workgroup=[WORKGROUP] Domain=[]
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
public Disk Public
C$ Disk Default share
IPC$ IPC Remote IPC
OReilly Printer OReilly
print$ Disk Printer Drivers
This machine has a browse list:
Server Comment
--------- -------
HOPPER Samba 1.9.15p8
KERNIGAN Samba 1.9.15p8
LOVELACE Samba 1.9.15p8
RITCHIE Samba 1.9.15p8
ZIMMERMAN
Browse list ÐÏËÁÚÙ×ÁÅÔ ÄÒÕÇÉÅ SMB ÓÅÒ×ÅÒÁ × ÓÅÔÉ Ó ÄÏÓÔÕÐÎÙÍÉ ÒÅÓÕÒÓÁÍÉ.
äÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ËÌÉÅÎÔÁ, ×ÙÐÏÌÎÉÔÅ ÓÌÅÄÕÀÝÕÀ ËÏÍÁÎÄÕ:
/usr/sbin/smbclient service <password>
ÇÄÅ 'service' -- ÉÍÑ ÍÁÛÉÎÙ É ÓÅÒ×ÉÓÁ. îÁÐÒÉÍÅÒ, ÅÓÌÉ ×Ù ÐÙÔÁÅÔÅÓØ ÏÂÒÁÔÉÔØÓÑ Ë ÄÉÒÅËÔÏÒÉÉ, ËÏÔÏÒÁÑ ÄÏÓÔÕÐÎÁ ÐÏÄ ÉÍÅÎÅÍ 'public' ÎÁ ÍÁÛÉÎÅ ÎÁÚ×ÁÎÎÏÊ 'zimmerman', ÔÏ ÉÍÑ ÓÅÒ×ÉÓÁ ÄÏÌÖÎÏ Ú×ÕÞÁÔØ ËÁË \\zimmerman\public. ïÄÎÁËÏ × ÓÌÅÄÓÔ×ÉÉ ÏÇÒÁÎÉÞÅÎÉÊ ÏÂÏÌÏÞËÉ, ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÓÐÒÑÔÁÔØ ÏÂÒÁÔÎÙÊ ÓÌÜÛ, ÔÁË ÞÔÏ × ÉÔÏÇÅ ÜÔÏ ËÏÍÁÎÄÎÁÑ ÓÔÒÏËÁ ×ÙÇÌÑÄÅÔØ ÓÌÅÄÕÀÝÉÍ ÏÂÒÁÚÏÍ:
/usr/sbin/smbclient \\\\zimmerman\\public mypasswd
ÇÄÅ 'mypasswd' -- ÓÉÍ×ÏÌØÎÁÑ ÓÔÒÏËÁ ×ÁÛÅÇÏ ÐÁÒÏÌÑ.
÷Ù ÐÏÌÕÞÉÔÅ ÐÒÉÇÌÁÛÅÎÉÅ smbclient:
Server time is Sat Aug 10 15:58:44 1996
Timezone is UTC+10.0
Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
smb: \>
îÁÐÅÞÁÔÁÊÔÅ 'h' ÞÔÏÂÙ ÐÏÌÕÞÉÔØ ÐÏÍÏÝØ Ï ÉÓÐÏÌØÚÏ×ÁÎÉÉ smbclient:
smb: \> h
ls dir lcd cd pwd
get mget put mput rename
more mask del rm mkdir
md rmdir rd prompt recurse
translate lowercase print printmode queue
cancel stat quit q exit
newer archive tar blocksize tarmode
setmode help ? !
smb: \>
åÓÌÉ ×Ù ÕÍÅÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ftp, ÔÏ ×ÁÍ ÎÅ ÂÕÄÕÔ ÎÕÖÎÙ ÓÐÒÁ×ÏÞÎÙÅ ÓÔÒÁÎÉÃÙ Ï smbclient.
èÏÔÑ ×Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ smbclient ÄÌÑ ÔÅÓÔÉÒÏ×ÁÎÉÑ, ×Ù ÓËÏÒÏ ÕÓÔÁÎÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÅÇÏ × ÒÁÂÏÔÅ. äÌÑ ÒÁÂÏÔÙ ×ÁÍ ÓËÏÒÅÅ ×ÓÅÇÏ ÐÏÎÁÄÏÂÉÔÓÑ ÐÁËÅÔ smbfs. Smbfs ÐÏÓÔÁ×ÌÑÅÔÓÑ Ó Ä×ÕÍÑ ÐÒÏÓÔÙÍÉ ÕÔÉÌÉÔÁÍÉ, smbmount É smbumount. ïÎÉ ÒÁÂÏÔÁÀÔ ÐÏÄÏÂÎÏ mount É umount ÄÌÑ SMB-ÒÅÓÕÒÓÏ×.
ðÁËÅÔ smbfs ÔÅÐÅÒØ ×ËÌÀÞÅÎ × ÂÏÌØÛÉÎÓÔ×Ï ÄÉÓÔÒÉÂÕÔÉ×Ï× Linux. ÷ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÐÏÍÎÉÔØ ÏÄÎÕ ×ÁÖÎÕÀ ×ÅÝØ: äÌÑ ÔÏÇÏ ÞÔÏÂÙ ÉÓÐÏÌØÚÏ×ÁÔØ ÜÔÉ ÕÔÉÌÉÔÙ ×ÁÍ ÎÅÏÂÈÏÄÉÍÁ ÐÏÄÄÅÒÖËÁ smbfs × ÑÄÒÅ.
äÌÑ ÏÒÇÁÎÉÚÁÃÉÉ ÄÏÓÔÕÐÁ Ë Linux-ÐÒÉÎÔÅÒÕ Ó Windows ÍÁÛÉÎ, ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÕÂÅÄÉÔØÓÑ, ÞÔÏ ÐÒÉÎÔÅÒ ÒÁÂÏÔÁÅÔ ÐÏÄ Linux. åÓÌÉ ×Ù ÍÏÖÅÔÅ ÐÅÞÁÔÁÔØ ÐÏÄ Linux, ÔÏ ÏÒÇÁÎÉÚÁÃÉÑ ÄÏÓÔÕÐÁ Ë ÐÒÉÎÔÅÒÕ ÂÕÄÅÔ ÏÞÅÎØ ÐÒÏÓÔÁ.
óÍÏÔÒÉÔÅ Printing HOWTO ÄÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ Ï ÎÁÓÔÒÏÊËÅ ÐÅÞÁÔÉ.
ðÏÓËÏÌØËÕ Á×ÔÏÒ ÉÓÐÏÌØÚÕÅÔ ÐÒÉÎÔÅÒ, ÐÏÄËÌÀÞÅÎÎÙÊ Ë ÍÁÛÉÎÅ Ó Windows NT(ÜÔÏ ÂÙÌÏ ÄÁ×ÎÏ - ÄÏ ÐÅÒÅ×ÏÄÁ ÐÏÞÔÉ ×ÓÅÊ ÓÅÔÉ ÐÏÌÎÏÓÔØÀ ÎÁ Linux), ÜÔÏÔ ÒÁÚÄÅÌ ÎÅ ÄÏÌÖÅÎ ÒÁÓÓÍÁÔÒÉ×ÁÔØÓÑ ËÁË ÚÁËÏÎÞÅÎÎÙÊ, Á ÔÏÌØËÏ ËÁË ÒÅËÏÍÅÎÄÁÃÉÑ. õ ËÏÇÏ ÅÓÔØ ÉÎÆÏÒÍÁÃÉÑ Ï ÏÒÇÁÎÉÚÁÃÉÉ ÔÁËÏÇÏ ÄÏÓÔÕÐÁ, ÐÏÓÙÌÁÊÔÅ ÅÅ ÍÎÅ ÎÁ ÁÄÒÅÓ: dwood@plugged.net.au, ÔÁË ÞÔÏ ÜÔÏÔ ÒÁÚÄÅÌ ÍÏÖÅÔ ÂÙÔØ ÄÏÐÏÌÎÅÎ × ÂÕÄÕÝÅÍ.
äÏÂÁ×ØÔÅ ÎÁÓÔÒÏÊËÕ ÐÒÉÎÔÅÒÁ × ×ÁÛ ÆÁÊÌ smb.conf:
[global]
printing = bsd
printcap name = /etc/printcap
load printers = yes
log file = /var/log/samba-log.%m
lock directory = /var/lock/samba
[printers]
comment = All Printers
security = server
path = /var/spool/lpd/lp
browseable = no
printable = yes
public = yes
writable = no
create mode = 0700
[ljet]
security = server
path = /var/spool/lpd/lp
printer name = lp
writable = yes
public = yes
printable = yes
print command = lpr -r -h -P %p %s
õÂÅÄÉÔÅÓØ, ÞÔÏ ÐÕÔØ Ë ÐÒÉÎÔÅÒÕ (× ÜÔÏÍ ÓÌÕÞÁÅ ÄÌÑ [ljet]) ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ
ÂÕÆÅÒÎÏÊ ÄÉÒÅËÔÏÒÉÉ, ÕËÁÚÁÎÎÏÊ × ÆÁÊÌÅ /etc/printcap
!
óÔÒÏËÉ:
printcap name = /etc/printcap load printers = yes
ËÏÎÔÒÏÌÉÒÕÀÔ ÄÏÌÖÎÙ ÌÉ ×ÓÅ ÐÒÉÎÔÅÒÁ, ÐÅÒÅÞÉÓÌÅÎÎÙÅ × /etc/printcap ÐÏ ÕÍÏÌÞÁÎÉÀ ÂÙÔØ ÚÁÇÒÕÖÅÎÙ. åÓÌÉ ×Ù ÓÄÅÌÁÅÔÅ ÜÔÏ, ÔÏ ÎÅÔ ÐÒÉÞÉÎÙ ÄÌÑ ÎÁÓÔÒÏÊËÉ ËÁÖÄÏÇÏ ÐÒÉÎÔÅÒÁ × ÏÔÄÅÌØÎÏÓÔÉ. òÁÚÄÅÌ [printers] ÕËÁÚÙ×ÁÅÔ ÎÁÓÔÒÏÊËÉ ÄÌÑ ÐÒÉÎÔÅÒÏ×, ËÏÔÏÒÙÅ ×Ù ÈÏÔÉÔÅ ÏÐÒÅÄÅÌÉÔØ Ñ×ÎÏ. åÓÌÉ ÉÓÐÏÌØÚÕÅÍÁÑ ×ÁÍÉ ÐÏÄÓÉÓÔÅÍÁ ÐÅÞÁÔÉ ÎÅ ÒÁÂÏÔÁÅÔ ÜÔÉÍ ÏÂÒÁÚÏÍ (BSD), ÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÎÁÓÔÒÏÉÔØ ÆÁÌØÛÉ×ÙÊ ÆÁÊÌ printcap (ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ 'print command', ÓÍÏÔÒÉÔÅ ÎÉÖÅ). äÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ Ï ÓÉÓÔÅÍÅ printcap ÓÍÏÔÒÉÔÅ Printing-HOWTO.
ðÏÌÅÚÎÙÍ ÐÒÉÅÍÏÍ ÄÌÑ ÐÒÏ×ÅÒËÉ ÓÅÔÅ×ÙÈ ÓÏÅÄÉÎÅÎÉÊ Ñ×ÌÑÅÔÓÑ ÉÚÍÅÎÅÎÉÅ ËÏÍÁÎÄÙ ÐÅÞÁÔÉ ÎÁ:
print command = cp %S /tmp/print.%P.%S
éÔÏÇÏ×ÙÊ ÆÁÊÌ ÍÏÖÅÔ ÂÙÔØ ÐÒÏÁÎÁÌÉÚÉÒÏ×ÁÎ.
úáíåþáîéå: óÕÝÅÓÔ×ÕÀÔ ÎÅËÏÔÏÒÙÅ ÐÒÏÂÌÅÍÙ Ó ÄÏÓÔÕÐÏÍ Ë ÐÒÉÎÔÅÒÁÍ ÎÁ UNIX-ÍÁÛÉÎÁÈ ÄÌÑ ÍÁÛÉÎ Ó Windows NT ÉÓÐÏÌØÚÕÑ Samba. ïÄÎÁ ÉÚ ÐÒÏÂÌÅÍ × ÔÏÍ, ÞÔÏ NT ÎÅÐÒÁ×ÉÌØÎÏ ×ÉÄÉÔ ÓÅÔÅ×ÏÊ ÐÒÉÎÔÅÒ. äÌÑ ÒÅÛÅÎÉÑ ÜÔÏÊ ÐÒÏÂÌÅÍÙ, ÓÍÏÔÒÉÔÅ ÚÁÍÅÞÁÎÉÅ × ÆÁÊÌÅ docs/WinNT.txt ÄÉÓÔÒÉÂÕÔÉ×Á Samba. äÒÕÇÁÑ ÐÒÏÂÌÅÍÁ Ó×ÑÚÁÎÁ Ó ÐÒÏÂÌÅÍÏÊ ÐÁÒÏÌÑ. óÍÏÔÒÉÔÅ ËÏÍÍÅÎÔÁÒÉÊ × ÔÏÍ ÖÅ ÓÁÍÏÍ ÆÁÊÌÅ.
Oleg L. Machulskiy ( machulsk@shade.msu.ru) ÐÒÅÄÌÏÖÉÌ ÂÏÌÅÅ ÕÄÏÂÎÕÀ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ËÏÍÁÎÄÕ ÐÅÞÁÔÉ, ÞÅÍ × ×ÙÛÅÐÒÉ×ÅÄÅÎÎÏÍ ÐÒÉÍÅÒÅ:
print command = smb2ps %s | lpr -r -h -P %p
ÇÄÅ 'smb2ps' Ñ×ÌÑÅÔÓÑ ÓËÒÉÐÔÏÍ, ËÏÔÏÒÙÊ ÐÒÅÏÂÒÁÚÕÅÔ ÂÕÆÅÒÎÙÊ ÆÁÊÌ, ÐÅÒÅÄÁÎÎÙÊ ÉÚ ÐÏÄ Windows × ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÅÍÙÊ ÆÁÊÌ Postscript. ïÎ ÄÏÌÖÅÎ ÕÄÁÌÑÔØ ÐÅÒ×ÙÅ ÔÒÉ É ÐÏÓÌÅÄÎÉÅ Ä×Å ÓÔÒÏËÉ, ÐÏÔÏÍÕ ÞÔÏ ÜÔÉ ÓÔÒÏËÉ ÓÏÄÅÒÖÁÔ ÎÅËÏÔÏÒÙÅ ËÏÄÙ PJL ÉÌÉ PCL.
ôÁËÏÊ ÐÏÄÈÏÄ ÎÕÖÅÎ ÔÏÌØËÏ ÅÓÌÉ ×ÁÛÁ ÍÁÛÉÎÁ Ó Windows ÐÅÞÁÔÁÅÔ PCL, Á ÎÅ ÎÁÓÔÏÑÝÉÊ Postscript. ñ ÏÂÎÁÒÕÖÉÌ, ÞÔÏ Windows 95/98/NT ÎÅ ÉÍÅÀÔ ÏÂÝÅÇÏ ÄÒÁÊ×ÅÒÁ Postscript, ÎÏ ÄÒÁÊ×ÅÒ ÐÒÉÎÔÅÒÁ "Digital turbo Printserver 20" ÍÏÖÅÔ ÒÁÂÏÔÁÔØ ËÁË ÈÏÒÏÛÉÊ ÄÒÁÊ×ÅÒ Postscript ÄÌÑ ÂÏÌØÛÉÎÓÔ×Á ÓÌÕÞÁÅ×. ñ ÔÁËÖÅ ÓÌÙÛÁÌ, ÞÔÏ ÄÌÑ ÜÔÉÈ ÖÅ ÃÅÌÅÊ ÍÏÖÅÔ ÒÁÂÏÔÁÔØ ÄÒÁÊ×ÅÒ "Apple LaserWriter II NTX".
Jeff Stern ( jstern@eclectic.ss.uci.edu) ÎÁÐÉÓÁÌ ÓÌÅÄÕÀÝÅÅ, ÞÔÏ ÍÏÖÅÔ ÐÏÍÏÞØ ÎÅËÏÔÏÒÙÍ ÉÚ ×ÁÓ:
--------------------------%<----------------------------------
õ ÍÅÎÑ ÂÙÌÁ ÐÒÏÂÌÅÍÁ, ËÏÔÏÒÁÑ ÚÁËÌÀÞÁÌÁÓØ × ÔÏÍ, ÞÔÏ Ñ ÍÏÇ ÐÅÞÁÔÁÔØ, ÉÓÐÏÌØÚÕÑ lpd/lpr ÎÁ ÍÏÊ ÐÒÉÎÔÅÒ, ÐÏÄËÌÀÞÅÎÎÙÊ Ë Linux, Ó ÓÁÍÏÊ ÍÁÛÉÎÙ ÐÏÄ Linux. îÏ Ñ ÎÅ ÍÏÇ ÐÅÞÁÔÁÔØ ÎÁ ÜÔÏÔ ÐÒÉÎÔÅÒ Ó ÕÄÁÌÅÎÎÏÊ ÍÁÛÉÎÙ ÐÏÄ Win95. ëÏÇÄÁ Ñ ÐÏÐÒÏÂÏ×ÁÌ ÚÁÐÕÓÔÉÔØ
smbclient \\eclectic\belen -P
É ÚÁÔÅÍ ÐÏÐÙÔÁÌÓÑ ×ÙÐÏÌÎÉÔØ
print myfile
Ñ ÐÏÌÕÞÉÌ ÓÏÏÂÝÅÎÉÅ Ï ÔÏÍ, ÞÔÏ ÄÏÓÔÕÐ ÚÁÐÒÅÝÅÎ. ñ ÕÓÔÁÎÏ×ÉÌ ÐÒÁ×Á ÄÏÓÔÕÐÁ ÎÁ ÄÉÒÅËÔÏÒÉÀ /var/spool/lpd/lp1 ÒÁ×ÎÙÍÉ 777. ñ ËÏÎÅÞÎÏ ÉÚ×ÉÎÑÀÓØ, ÎÏ Ñ ÜÔÏ ÓÄÅÌÁÌ. ñ ÔÁËÖÅ ÐÒÅÄÐÏÌÁÇÁÀ, × ËÁÞÅÓÔ×Å ÁÌØÔÅÒÎÁÔÉ×Ù, ÞÔÏ Ñ ÍÏÇ ÂÙ ÐÏÍÅÓÔÉÔØ ×ÓÅÈ, ËÔÏ ÚÁÒÅÇÅÓÔÒÉÒÏ×ÁÎ ÎÁ ÍÁÛÉÎÅ Ó Linux × ÇÒÕÐÐÕ 'lp', ÉÌÉ ÚÁÄÁÔØ ×ÌÁÄÅÌØÃÅÍ ÄÉÒÅËÔÏÒÉÉ ÇÒÕÐÐÕ 'users', É Ô.Ð... îÏ ÓÅÊÞÁÓ ÜÔÏ ÒÁÂÏÔÁÅÔ (Ó ×ÌÁÄÅÌØÃÅÍ root:lp).
÷ ËÏÎÃÅ, ÄÒÕÇÁÑ ×ÅÝØ ËÏÔÏÒÕÀ ÄÏÌÖÅÎ ÚÎÁÔØ ÁÄÍÉÎÉÓÔÒÁÔÏÒ ÜÔÏ ÉÍÑ ÐÏÌØÚÏ×ÁÔÅÌÑ ÎÁ ÍÁÛÉÎÅ Ó Windows (ËÏÔÏÒÙÊ ÐÙÔÁÅÔÓÑ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÒÉÎÔÅÒ Linux ÞÅÒÅÚ Samba), ËÏÔÏÒÏÅ ÄÏÌÖÎÏ ÂÙÔØ ÔÁËÖÅ ÎÁÚ×ÁÎÏ É ÎÁ ÍÁÛÉÎÅ Ó Linux. ôÁËÉÍ ÏÂÒÁÚÏÍ, ÅÓÌÉ ÐÏÌØÚÏ×ÁÔÅÌØ 'joe' ÎÁ ÍÁÛÉÎÅ Ó Windows, ÎÁÚ×ÁÎÎÏÊ 'mywinbox' ÐÏÐÙÔÁÅÔÓÑ ÎÁÐÅÞÁÔÁÔØ ÎÁ ÐÒÉÎÔÅÒ 'belen' ÎÁ ÍÁÛÉÎÅ Ó Linux 'eclectic' (\\eclectic\belen) ÔÏ ÔÁËÖÅ ÄÏÌÖÅÎ ÂÙÔØ ÐÏÌØÚÏ×ÁÔÅÌØ 'joe' ÎÁ ÍÁÛÉÎÅ Ó Linux. úÁÔÅÍ, ÐÁÒÏÌØ 'joe' ÄÏÌÖÅÎ ÂÙÔØ ÐÁÒÏÌÅÍ ÄÌÑ ÄÏÓÔÕÐÁ Ë ÐÒÉÎÔÅÒÕ 'belen' ÎÁ ÍÁÛÉÎÅ 'eclectic'. üÔÏ ÐÁÒÏÌØ ÂÕÄÅÔ ÚÁÐÒÏÛÅÎ ÐÒÉ ÕÓÔÁÎÏ×ËÅ ÐÒÉÎÔÅÒÁ ÎÁ ÍÁÛÉÎÅ Ó Windows, ÉÓÐÏÌØÚÕÑ ÍÁÓÔÅÒ ÄÏÂÁ×ÌÅÎÉÑ ÐÒÉÎÔÅÒÁ.
ñ ÄÕÍÁÀ, ÞÔÏ ÜÔÏ ÎÅ ÄÏÌÖÎÏ ÂÙÔØ ÓÌÕÞÁÊÎÙÍ, ÐÏÓËÏÌØËÕ Ñ ÕÓÔÁÎÏ×ÉÌ ÍÏÊ ÐÒÉÎÔÅÒ ËÁË 'public' × smb.conf. îÏ ÎÅÓÏÍÎÅÎÎÏ ÏÎ ×ÓÅ ÒÁ×ÎÏ ÓÐÒÛÉ×ÁÅÔ ÐÁÒÏÌØ. (íÁÛÉÎÙ ÐÏÄ Windows Ë ÓÏÖÁÌÅÎÉÀ ÎÅ ÄÁÀÔ ×ÁÍ ×ÏÚÍÏÖÎÏÓÔØ ÕËÁÚÁÔØ ÄÒÕÇÏÅ ÉÍÑ ÄÌÑ ÕÄÁÌÅÎÎÏÇÏ ÐÒÉÎÔÅÒÁ (ÐÏÄ Linux). Windows ÐÒÏÓÔÏ ÉÓÐÏÌØÚÕÅÔ ÉÍÑ ÌÏËÁÌØÎÏÇÏ ÐÏÌØÚÏ×ÁÔÅÌÑ, ËÏÔÏÒÙÅ ×Ù ××ÅÌÉ, ËÏÇÄÁ ÚÁÐÕÓÔÉÌÉ Win95.
--------------------------%<----------------------------------
Dr. Michael Langner ( langner@fiz-chemie.de ÕËÁÚÁÌ, ÞÔÏ ÐÒÏÂÌÅÍÁ ÐÒÁ× ÄÏÓÔÕÐÁ ÎÁ ÚÁÐÉÓØ ÎÁ ÄÅÒÅ×Ï ÄÉÒÅËÔÏÒÉÊ /var/spool/lpd/ ÍÏÖÅÔ ÂÙÔØ ÉÚÂÅÇÎÕÔÁ, ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÞÅÇÏ-ÔÏ ÐÏÄÏÂÎÏÇÏ "path=/tmp" É "print command = lpr -r -P%p %s".
éÎÏÇÄÁ ×ÏÚÎÉËÁÅÔ ÏÛÉÂËÁ ÒÁÚÂÏÒÁ Postscript ÐÒÉ ÐÅÞÁÔÉ Postscript Ó ÍÁÛÉÎÙ ÐÏÄ Windows, ÞÔÏ ×ÙÚÙ×ÁÅÔ ÐÅÞÁÔØ ÌÉÛÎÉÈ ÓÔÒÁÎÉÃ × ËÏÎÃÅ ËÁÖÄÏÇÏ ÚÁÄÁÎÉÑ. ðÏÓÌÅÄÎÑÑ ÓÔÒÁÎÉÃÁ ×ÓÅÇÄÁ ÂÕÄÅÔ ÓÏÄÅÒÖÁÔØ ÓÏÏÂÝÅÎÉÅ "%%[ Lastpage ]%%" × ÚÁÇÏÌÏ×ËÅ. üÔÏ ËÁÖÅÔÓÑ ÓÌÕÞÁÅÔÓÑ ÔÏÌØËÏ ÎÁ ÍÁÛÉÎÁÈ Ó Windows 95 É 98 É ÜÔÏ ÐÒÏÉÓÈÏÄÉÔ ÉÚ-ÚÁ ÔÏÇÏ, ÞÔÏ Postscript Ñ×ÌÑÅÔÓÑ ÐÌÏÈÏÓÆÏÒÍÉÒÏ×ÁÎÎÙÍ.
ïÄÎÉÍ ÉÚ ÓÐÏÓÏÂÏ× ÏÂÒÁÂÏÔËÉ ÜÔÏÊ ÏÛÉÂËÉ --- ÉÓÐÏÌØÚÏ×ÁÔØ ÓËÒÉÐÔ ÄÌÑ ÕÄÁÌÅÎÉÑ ËÕÓËÁ ÐÌÏÈÏÇÏ Postscript ÉÚ ÚÁÄÁÎÉÑ ÐÅÞÁÔÉ. äÒÕÇÉÍ ÓÐÏÓÏÂÏÍ Ñ×ÌÑÅÔÓÑ ÎÁÈÏÖÄÅÎÉÅ ÌÕÞÛÅÇÏ ÄÒÁÊ×ÅÒÁ Postscript ÄÌÑ Windows. ÷ÅÒÏÑÔÎÏ ÌÕÞÛÉÊ ÓÐÏÓÏ ÄÌÑ ÎÁÓ ÜÔÏ ÉÓÐÏÌØÚÏ×ÁÔØ LPRng ×ÍÅÓÔÏ Postscript ÄÌÑ ÐÅÞÁÔÉ ÎÁ ÓÅÒ×ÅÒ Samba.
Erik Ratcliffe ( erik@caldera.com), Caldera, ÓÏÏÂÝÉÌ, ÞÔÏ ÉÓÐÏÌØÚÏ×ÁÎÉÅ LPRng ÏÚÎÁÞÁÅÔ, ÞÔÏ ÌÀÂÏÊ ÄÒÁÊ×ÅÒ ÐÒÉÎÔÅÒÁ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎ Ó ÍÁÛÉÎ ÐÏÄ Windows. îÁ ÓÅÒ×ÅÒÅ Samba, ÏÎÉ ÉÓÐÏÌØÚÕÀÔ ÚÁÐÉÓØ × /etc/printcap, ËÏÔÏÒÁÑ ×ÙÇÌÑÄÉÔ ÐÒÉÍÅÒÎÏ ÔÁË:
raw:\
:rw:sh:
:lp=/dev/lp1
:sd=/var/spool/lpd/raw
:fx=flp
LPRng ÎÅ ÔÒÅÂÕÅÔ :\ × ËÏÎÃÅ ËÁÖÄÏÊ ÓÔÒÏËÉ. úÁÐÉÓØ Ï ÐÒÉÎÔÅÒÅ ×ÓÅ ÒÁ×ÎÏ ÎÅÏÂÈÏÄÉÍÏ ÓÄÅÌÁÔØ × ÆÁÊÌÅ /etc/smb.conf ÄÌÑ ÆÉÚÉÞÅÓËÏÇÏ ÐÒÉÎÔÅÒÁ. óÔÒÏËÁ ËÏÍÁÎÄÙ ÐÅÞÁÔÉ ÎÕÖÎÁ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÚÁÐÉÓÉ "raw" ÉÚ ÆÁÊÌÁ /etc/printcap É ÄÁÎÎÙÅ ÄÏÌÖÎÙ ÐÏÓÙÌÁÔØÓÑ × Ä×ÏÉÞÎÏÊ ÆÏÒÍÅ. ðÏÐÒÏÂÕÊÔÅ ×ÏÔ ÔÁËÕÀ ËÏÍÁÎÄÎÕÀ ÓÔÒÏËÕ:
print command = lpr -b -Praw %s
÷ÁÍ ÔÁËÖÅ ÍÏÖÅÔ ÐÏÎÁÄÏÂÉÔØÓÑ ÕÓÔÁÎÏ×ÉÔØ ÂÕÆÅÒÉÚÁÃÉÀ ÐÅÞÁÔÉ ÎÁ Windows95 ÄÌÑ ÐÅÞÁÔÉ ÐÒÑÍÏ ÎÁ ÐÒÉÎÔÅÒ, ×ÍÅÓÔÏ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÂÕÆÅÒÉÚÁÃÉÉ ÎÁ ÓÅÒ×ÅÒÅ.
äÌÑ ÄÏÓÔÕÐÁ Ë ÐÒÉÎÔÅÒÕ ÎÁ Windows ÍÁÛÉÎÅ, ×Ù ÄÏÌÖÎÙ ÓÄÅÌÁÔØ ÓÌÅÄÕÀÝÅÅ:
úÁÐÉÓØ × ÆÁÊÌÅ /etc/printcap
, ÐÒÉ×ÅÄÅÎÎÏÍ ÎÉÖÅ, ÓÄÅÌÁÎÁ ÄÌÑ
ÐÒÉÎÔÅÒÁ HP 5MP ÎÁ ÓÅÒ×ÅÒÅ Windows NT. éÓÐÏÌØÚÕÀÔÓÑ ÓÌÅÄÕÀÝÉÅ ÐÏÌÑ ÆÁÊÌÁ
/etc/printcap
:
cm - ËÏÍÍÅÎÔÁÒÉÊ lp - ÉÍÑ ÕÓÔÒÏÊÓÔ×Á, ÏÔËÒÙ×ÁÅÍÏÇÏ ÄÌÑ ×Ù×ÏÄÁ sd - ÄÉÒÅËÔÏÒÉÑ ÓÐÕÌÁ ÐÒÉÎÔÅÒÁ (ÎÁ ÌÏËÁÌØÎÏÊ ÍÁÛÉÎÅ) af - ÆÁÊÌ ÕÞÅÔÁ ÐÏÌØÚÏ×ÁÎÉÑ ÐÒÉÎÔÅÒÏÍ mx - ÍÁËÓÉÍÁÌØÎÙÊ ÒÁÚÍÅÒ ÆÁÊÌÁ (ÎÏÌØ -- ÂÅÚ ÏÇÒÁÎÉÞÅÎÉÊ) if - ÉÍÑ ×ÈÏÄÎÏÇÏ ÆÉÌØÔÒÁ (ÓËÒÉÐÔÁ)
äÌÑ ÂÏÌÅÅ ÄÅÔÁÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ Ï ÐÅÞÁÔÉ ÓÍÏÔÒÉÔÅ Printing HOWTO ÉÌÉ ÓÐÒÁ×ÏÞÎÙÅ ÓÔÒÁÎÉÃÙ ÐÏ printcap.
# /etc/printcap
#
# //zimmerman/oreilly via smbprint
#
lp:\
:cm=HP 5MP Postscript OReilly on zimmerman:\
:lp=/dev/lp1:\
:sd=/var/spool/lpd/lp:\
:af=/var/spool/lpd/lp/acct:\
:mx#0:\
:if=/usr/bin/smbprint:
õÂÅÄÉÔÅÓØ, ÞÔÏ ÂÕÆÅÒÎÙÅ ÄÉÒÅËÔÏÒÉÉ É ÄÉÒÅËÔÏÒÉÑ, ÉÓÐÏÌØÚÕÅÍÁÑ ÄÌÑ ÕÞÅÔÁ
ÐÏÌØÚÏ×ÁÎÉÑ ÓÕÝÅÓÔ×ÕÀÔ É ÉÍÅÀÔ ÐÒÁ×Ï ÎÁ ÚÁÐÉÓØ. õÂÅÄÉÔÅÓØ, ÞÔÏ ÓÔÒÏËÁ 'if'
ÓÏÄÅÒÖÉÔ ÐÒÁ×ÉÌØÎÙÊ ÐÕÔØ Ë ÓËÒÉÐÔÕ smbprint
(ÄÁÎ ÎÉÖÅ) É
ÕÂÅÄÉÔÅÓØ, ÞÔÏ ÚÁÐÉÓÉ ÕËÁÚÙ×ÁÀÔ ÎÁ ÐÒÁ×ÉÌØÎÏÅ ÕÓÔÒÏÊÓÔ×Ï ×Ù×ÏÄÁ
(ÓÐÅÃÉÁÌØÎÙÊ ÆÁÊÌ /dev).
äÁÌÅÅ ÉÄÅÔ ÓÁÍ ÓËÒÉÐÔ smbprint
. ïÎ ÏÂÙÞÎÏ ÎÁÈÏÄÉÔÓÑ × ÄÉÒÅËÔÏÒÉÉ
/usr/bin É ÎÁÐÉÓÁÎ Andrew Tridgell, ÞÅÌÏ×ÅËÏÍ, ËÏÔÏÒÙÊ ÐÁËÅÔ
ÓÏÚÄÁÌ Samba, ÎÁÓËÏÌØËÏ Ñ ÚÎÁÀ. üÔÏÔ ÓËÒÉÐÔ ÐÏÓÔÁ×ÌÑÅÔÓÑ ×ÍÅÓÔÅ Ó
ÄÉÓÔÒÉÂÕÔÉ×ÏÍ ÉÓÈÏÄÎÏÇÏ ËÏÄÁ Samba, ÎÏ ÏÔÓÕÔÓÔ×ÕÅÔ × ÎÅËÏÔÏÒÙÈ ÂÉÎÁÒÎÙÈ
ÄÉÓÔÒÉÂÕÔÉ×ÁÈ, ÔÁË ÞÔÏ Ñ ×ÏÓÓÏÚÄÁÌ ÅÇÏ ÚÄÅÓØ.
÷Ù ÍÏÖÅÔÅ ÚÁÈÏÔÅÔØ ×ÚÇÌÑÎÕÔØ ÎÁ ÎÅÇÏ ÂÏÌÅÅ ×ÎÉÍÁÔÅÌØÎÏ. åÓÔØ ÎÅËÏÔÏÒÙÅ ÍÅÌËÉÅ ÉÚÍÅÎÅÎÉÑ, ËÏÔÏÒÙÅ ÐÏËÁÚÁÌÉ ÓÅÂÑ ÐÏÌÅÚÎÙÍÉ.
#!/bin/sh -x
# üÔÏÔ ÓËÒÉÐÔ Ñ×ÌÑÅÔÓÑ ×ÈÏÄÎÙÍ ÆÉÌØÔÒÏÍ ÄÌÑ ÏÓÎÏ×ÁÎÎÏÊ ÎÁ printcap
# ÐÅÞÁÔÉ ÎÁ unix-ÍÁÛÉÎÁÈ. ïÎ ÉÓÐÏÌØÚÕÅÔ ÐÒÏÇÒÁÍÍÕ smbclient ÄÌÑ
# ÐÅÞÁÔÉ ÆÁÊÌÁ ÎÁ ÕËÁÚÁÎÎÙÊ smb-ÓÅÒ×ÅÒ É ÓÅÒ×ÉÓ.
# îÁÐÒÉÍÅÒ ×Ù ÍÏÖÅÔÅ ÉÍÅÔØ ÚÁÐÉÓØ × printcap ÐÏÄÏÂÎÕÀ ÜÔÏÊ
#
# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
#
# ËÏÔÏÒÁÑ ÓÏÚÄÁÅÔ unix-ÐÒÉÎÔÅÒ ÎÁÚ×ÁÎÎÙÊ "smb", ËÏÔÏÒÙÊ ÂÕÄÅÔ
# ÐÅÞÁÔÁÔØ Ó ÐÏÍÏÝØÀ ÜÔÏÇÏ ÓËÒÉÐÔÁ. ÷ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÓÏÚÄÁÔØ ÄÉÒÅËÔÏÒÉÀ
# ÓÐÕÌÁ /usr/spool/smb Ó ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÍÉ ÐÒÁ×ÁÍÉ É ×ÌÁÄÅÌØÃÅÍ
# õÓÔÁÎÏ×ÉÔÅ ÚÄÅÓØ ÓÅÒ×ÅÒ É ÓÅÒ×ÉÓ ÎÁ ËÏÔÏÒÙÊ ×Ù ÈÏÔÉÔÅ ÐÅÞÁÔÁÔØ. ÷
# ÜÔÏÍ ÐÒÉÍÅÒÅ Ñ ÉÍÅÀ PC Ó WfWg PC, ÎÁÚ×ÁÎÎÕÀ "lapland", ËÏÔÏÒÁÑ
# ÉÍÅÅÔ ÜËÓÐÏÒÔÉÒÕÅÍÙÊ ÐÒÉÎÔÅÒ, ÎÁÚÙ×ÁÅÍÙÊ "printer" ÂÅÚ ÐÁÒÏÌÑ
#
# äÁÌÅÅ ÓËÒÉÐÔ ÂÙÌ ÉÚÍÅÎÅÎ hamiltom@ecnz.co.nz (Michael Hamilton)
# ÔÁË ÞÔÏ ÓÅÒ×ÅÒ, ÓÅÒ×ÉÓ É ÐÁÒÏÌØ ÍÏÇÕÔ ÂÙÔØ ÓÞÉÔÁÎÙ ÉÚ ÆÁÊÌÁ
# /usr/var/spool/lpd/PRINTNAME/.config
#
# äÌÑ ÔÏÇÏ ÞÔÏÂÙ ÜÔÏ ÒÁÂÏÔÁÌÏ ÚÁÐÉÓØ × /etc/printcap ÄÏÌÖÎÁ
# ×ËÌÀÞÁÔØ ÆÁÊÌ ÕÞÅÔÁ ÉÓÐÏÌØÚÏ×ÁÎÉÑ (af=...):
#
# cdcolour:\
# :cm=CD IBM Colorjet on 6th:\
# :sd=/var/spool/lpd/cdcolour:\
# :af=/var/spool/lpd/cdcolour/acct:\
# :if=/usr/local/etc/smbprint:\
# :mx=0:\
# :lp=/dev/null:
#
# æÁÊÌ /usr/var/spool/lpd/PRINTNAME/.config ÄÏÌÖÅÎ ÓÏÄÅÒÖÁÔØ
# server=PC_SERVER
# service=PR_SHARENAME
# password="password"
#
# îÁÐÒÉÍÅÒ,
# server=PAULS_PC
# service=CJET_371
# password=""
#
# Debugging log file, change to /dev/null if you like.
#
logfile=/tmp/smb-print.log
# logfile=/dev/null
#
# The last parameter to the filter is the accounting file name.
#
spool_dir=/var/spool/lpd/lp
config_file=$spool_dir/.config
# Should read the following variables set in the config file:
# server
# service
# password
# user
eval `cat $config_file`
#
# Some debugging help, change the >> to > if you want to same space.
#
echo "server $server, service $service" >> $logfile
(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
echo translate
echo "print -"
cat
) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $user -N -P >> $logfile
âÏÌØÛÉÎÓÔ×Ï ÄÉÓÔÒÉÂÕÔÉ×Ï× Linux ÐÏÓÔÁ×ÌÑÅÔÓÑ Ó ÐÒÏÇÒÁÍÍÏÊ
nenscript
ÄÌÑ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÑ ASCII ÄÏËÕÍÅÎÔÏ× ×
Postscript. óÌÅÄÕÀÝÉÊ ÓËÒÉÐÔ ÎÁ perl ÄÅÌÁÅÔ ÖÉÚÎØ ÐÏÌØÚÏ×ÁÔÅÌÑ ÌÅÇÞÅ,
ÏÂÅÓÐÅÞÉ×ÁÑ ÐÒÏÓÔÏÊ ÉÎÔÅÒÆÅÊÓ ÄÌÑ ÐÅÞÁÔÉ ÉÓÐÏÌØÚÕÑ smbprint.
éÓÐÏÌØÚÏ×ÁÎÉÅ: print [-a|c|p] <filename> -a ÐÅÞÁÔÁÅÔ <filename> ËÁË ASCII -c ÐÅÞÁÔÁÅÔ <filename> ÏÔÆÏÒÍÁÔÉÒÏ×ÁÎÎÙÊ ËÁË ÉÓÈÏÄÎÙÊ ËÏÄ -p ÐÅÞÁÔÁÅÔ <filename> ËÁË Postscript åÓÌÉ ÏÐÃÉÉ ÎÅ ÚÁÄÁÎÙ, ÐÒÏÇÒÁÍÍÁ ÐÏÐÒÏÂÕÅÔ ÏÐÒÅÄÅÌÉÔØ ÔÉÐ ÆÁÊÌÁ É ÐÅÞÁÔÁÔØ ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ
éÓÐÏÌØÚÕÑ smbprint ÄÌÑ ÐÅÞÁÔÉ ASCII ÆÁÊÌÏ×, ÓËÒÉÐÔ ÓÌÅÄÉÔ ÚÁ ÄÌÉÎÎÙÍÉ ÓÔÒÏËÁÍÉ. åÓÌÉ ×ÏÚÍÏÖÎÏ, ÜÔÏÔ ÓËÒÉÐÔ ÒÁÚÒÙ×ÁÅÔ ÄÌÉÎÎÕÀ ÓÔÒÏËÕ ÎÁ ÐÒÏÂÅÌÅ (×ÍÅÓÔÏ ÒÁÚÒÙ×Á × ÓÅÒÅÄÉÎÅ ÓÌÏ×Á).
æÏÒÍÁÔÉÒÏ×ÁÎÉÅ ÉÓÈÏÄÎÏÇÏ ËÏÄÁ ×ÙÐÏÌÎÑÅÔÓÑ Ó ÐÏÍÏÝØÀ ÐÒÏÇÒÁÍÍÙ
nenscript
. ïÎÁ ÂÅÒÅÔ ASCII-ÆÁÊÌ É ÆÏÒÍÁÔÉÒÕÅÔ ÅÇÏ × 2 ËÏÌÏÎËÉ Ó
ÚÁÇÏÌÏ×ËÏÍ (ÄÁÔÁ, ÉÍÑ ÆÁÊÌÁ É Ô.Ð.). üÔÁ ÐÒÏÇÒÁÍÍÁ ÔÁËÖÅ ÎÕÍÅÒÕÅÔ
ÓÔÒÏËÉ. éÓÐÏÌØÚÕÑ ÜÔÏÔ ÓËÒÉÐÔ ËÁË ÐÒÉÍÅÒ, ÍÏÇÕÔ ÂÙÔØ ÄÏÂÁ×ÌÅÎÙ ÄÒÕÇÉÅ ÔÉÐÙ
ÆÏÒÍÁÔÉÒÏ×ÁÎÉÑ.
Postscript-ÄÏËÕÍÅÎÔÙ Ñ×ÌÑÀÔÓÑ ÕÖÅ ÏÔÆÏÒÍÁÔÉÒÏ×ÁÎÙ, ÔÁË ÞÔÏ ÏÎÉ ÐÅÞÁÔÁÀÔÓÑ ÓÒÁÚÕ.
#!/usr/bin/perl
# óËÒÉÐÔ: print
# á×ÔÏÒÙ: Brad Marshall, David Wood
# Plugged In Communications
# äÁÔÁ: 960808
#
# éÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÐÅÞÁÔÉ ÎÁ ÓÅÒ×ÉÓ oreilly, ËÏÔÏÒÙÊ ÒÁÓÐÏÌÏÖÅÎ ÎÁ
# ÓÅÒ×ÅÒÅ zimmerman
# îÁÚÎÁÞÅÎÉÅ: âÅÒÅÔ ÆÁÊÌÙ ÒÁÚÎÙÈ ÔÉÐÏ× ËÁË ÁÒÇÕÍÅÎÔ É ÏÂÒÁÂÁÔÙ×ÁÅÔ
# ÉÈ ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ ÄÌÑ ÐÅÒÅÄÁÞÉ ÎÁ ÓËÒÉÐÔ ÐÅÞÁÔØ Samba.
#
# ÷ ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ ÐÏÄÄÅÒÖÉ×ÁÀÔÓÑ ÔÉÐÙ ÆÁÊÌÏ×:
#
# ASCII - åÓÌÉ ÄÌÉÎÁ ÓÔÒÏËÉ ÄÌÉÎÎÅÅ ÞÅÍ $line_length ÓÉÍ×ÏÌÏ×, ÔÏ
# ÐÅÒÅÎÏÓÉÔ ÓÔÒÏËÕ ÎÁ ÐÒÏÂÅÌÅ
# Postscript - âÅÒÅÔ ÂÅÚ ÏÂÒÁÂÏÔËÉ
# Code - æÏÒÍÁÔÉÒÕÅÔ × Postscript (ÉÓÐÏÌØÚÕÑ nenscript), ÞÔÏÂÙ
# ÏÔÏÂÒÁÖÁÔØ ÐÒÁ×ÉÌØÎÏ (ÁÌØÂÏÍÎÙÊ ÆÏÒÍÁÔ, ÆÏÎÔ É Ô.Ð.)
#
# õÓÔÁÎÏ×ÉÔØ ÍÁËÓÉÍÁÌØÎÕÀ ÄÌÉÎÕ ÓÔÒÏËÉ ASCII ÔÅËÓÔÁ
$line_length = 76;
# õÓÔÁÎÏ×ÉÔØ ÐÕÔØ Ë ÓËÒÉÐÔÕ ÐÅÞÁÔÉ Samba
$print_prog = "/usr/bin/smbprint";
# õÓÔÁÎÏ×ÉÔØ ÐÕÔØ É ÉÍÑ nenscript (ËÏÎ×ÅÒÔÅÒÁ ASCII-->Postscript)
$nenscript = "/usr/bin/nenscript";
unless ( -f $print_prog ) {
die "Can't find $print_prog!";
}
unless ( -f $nenscript ) {
die "Can't find $nenscript!";
}
&ParseCmdLine(@ARGV);
# DBG
print "filetype is $filetype\n";
if ($filetype eq "ASCII") {
&wrap($line_length);
} elsif ($filetype eq "code") {
&codeformat;
} elsif ($filetype eq "ps") {
&createarray;
} else {
print "Sorry..no known file type.\n";
exit 0;
}
# Pipe the array to smbprint
open(PRINTER, "|$print_prog") || die "Can't open $print_prog: $!\n";
foreach $line (@newlines) {
print PRINTER $line;
}
# Send an extra linefeed in case a file has an incomplete last line.
print PRINTER "\n";
close(PRINTER);
print "Completed\n";
exit 0;
# --------------------------------------------------- #
# Everything below here is a subroutine #
# --------------------------------------------------- #
sub ParseCmdLine {
# Parses the command line, finding out what file type the file is
# Gets $arg and $file to be the arguments (if the exists)
# and the filename
if ($#_ < 0) {
&usage;
}
# DBG
# foreach $element (@_) {
# print "*$element* \n";
# }
$arg = shift(@_);
if ($arg =~ /\-./) {
$cmd = $arg;
# DBG
# print "\$cmd found.\n";
$file = shift(@_);
} else {
$file = $arg;
}
# Defining the file type
unless ($cmd) {
# We have no arguments
if ($file =~ /\.ps$/) {
$filetype = "ps";
} elsif ($file =~ /\.java$|\.c$|\.h$|\.pl$|\.sh$|\.csh$|\.m4$|\.inc$|\.html$|\.htm$/) {
$filetype = "code";
} else {
$filetype = "ASCII";
}
# Process $file for what type is it and return $filetype
} else {
# We have what type it is in $arg
if ($cmd =~ /^-p$/) {
$filetype = "ps";
} elsif ($cmd =~ /^-c$/) {
$filetype = "code";
} elsif ($cmd =~ /^-a$/) {
$filetype = "ASCII"
}
}
}
sub usage {
print "
éÓÐÏÌØÚÏ×ÁÎÉÅ: print [-a|c|p] <filename>
-a ÐÅÞÁÔÁÅÔ <filename> ËÁË ASCII
-c ÐÅÞÁÔÁÅÔ <filename> ÏÔÆÏÒÍÁÔÉÒÏ×ÁÎÎÙÊ ËÁË ÉÓÈÏÄÎÙÊ ËÏÄ
-p ÐÅÞÁÔÁÅÔ <filename> ËÁË Postscript
åÓÌÉ ÏÐÃÉÉ ÎÅ ÚÁÄÁÎÙ, ÐÒÏÇÒÁÍÍÁ ÐÏÐÒÏÂÕÅÔ ÏÐÒÅÄÅÌÉÔØ
ÔÉÐ ÆÁÊÌÁ É ÐÅÞÁÔÁÔØ ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ\n
";
exit(0);
}
sub wrap {
# Create an array of file lines, where each line is < the
# number of characters specified, and wrapped only on whitespace
# Get the number of characters to limit the line to.
$limit = pop(@_);
# DBG
#print "Entering subroutine wrap\n";
#print "The line length limit is $limit\n";
# Read in the file, parse and put into an array.
open(FILE, "<$file") || die "Can't open $file: $!\n";
while(<FILE>) {
$line = $_;
# DBG
#print "The line is:\n$line\n";
# Wrap the line if it is over the limit.
while ( length($line) > $limit ) {
# DBG
#print "Wrapping...";
# Get the first $limit +1 characters.
$part = substr($line,0,$limit +1);
# DBG
#print "The partial line is:\n$part\n";
# Check to see if the last character is a space.
$last_char = substr($part,-1, 1);
if ( " " eq $last_char ) {
# If it is, print the rest.
# DBG
#print "The last character was a space\n";
substr($line,0,$limit + 1) = "";
substr($part,-1,1) = "";
push(@newlines,"$part\n");
} else {
# If it is not, find the last space in the
# sub-line and print up to there.
# DBG
#print "The last character was not a space\n";
# Remove the character past $limit
substr($part,-1,1) = "";
# Reverse the line to make it easy to find
# the last space.
$revpart = reverse($part);
$index = index($revpart," ");
if ( $index > 0 ) {
substr($line,0,$limit-$index) = "";
push(@newlines,substr($part,0,$limit-$index)
. "\n");
} else {
# There was no space in the line, so
# print it up to $limit.
substr($line,0,$limit) = "";
push(@newlines,substr($part,0,$limit)
. "\n");
}
}
}
push(@newlines,$line);
}
close(FILE);
}
sub codeformat {
# Call subroutine wrap then filter through nenscript
&wrap($line_length);
# Pipe the results through nenscript to create a Postscript
# file that adheres to some decent format for printing
# source code (landscape, Courier font, line numbers).
# Print this to a temporary file first.
$tmpfile = "/tmp/nenscript$$";
open(FILE, "|$nenscript -2G -i$file -N -p$tmpfile -r") ||
die "Can't open nenscript: $!\n";
foreach $line (@newlines) {
print FILE $line;
}
close(FILE);
# Read the temporary file back into an array so it can be
# passed to the Samba print script.
@newlines = ("");
open(FILE, "<$tmpfile") || die "Can't open $file: $!\n";
while(<FILE>) {
push(@newlines,$_);
}
close(FILE);
system("rm $tmpfile");
}
sub createarray {
# Create the array for postscript
open(FILE, "<$file") || die "Can't open $file: $!\n";
while(<FILE>) {
push(@newlines,$_);
}
close(FILE);
}
ôÅÐÅÒØ Ï ÐÒÉÍÅÎÅÎÉÉ MagicFilter. óÐÁÓÉÂÏ Alberto Menegazzi ( flash.egon@iol.it) ÚÁ ÅÇÏ ÉÎÆÏÒÍÁÃÉÀ.
Alberto ÓÏÏÂÝÉÌ: --------------------------%<---------------------------------- 1) õÓÔÁÎÏ×ÉÔÅ MagicFilter × /usr/bin/local Ó ÆÉÌØÔÒÁÍÉ ÄÌÑ ÎÅÏÂÈÏÄÉÍÙÈ ÐÒÉÎÔÅÒÏ×, ÎÏ îå ÚÁÐÏÌÎÑÊÔÅ ÚÁÐÉÓÉ × /etc/printcap, ËÁË ÐÒÅÄÐÏÌÁÇÁÅÔÓÑ × ÄÏËÕÍÅÎÔÁÃÉÉ ÎÁ MagicFilter.
2) úÁÐÉÛÉÔÅ × /etc/printcap ÐÒÉÍÅÒÎÏ ×ÏÔ ÔÁËÕÀ ÚÁÐÉÓØ (üÔÏ ÓÄÅÌÁÎÏ ÄÌÑ ÍÏÅÇÏ ÐÒÉÎÔÅÒÁ LaserJet 4L):
lp|ljet4l:\ :cm=HP LaserJet 4L:\ :lp=/dev/null:\ # or /dev/lp1 :sd=/var/spool/lpd/ljet4l:\ :af=/var/spool/lpd/ljet4l/acct:\ :sh:mx#0:\ :if=/usr/local/bin/main-filter:
÷Ù ÄÏÌÖÎÙ, ÏÂßÑÓÎÉÔØ, ÞÔÏ ÕÓÔÒÏÊÓÔ×Ï lp=/dev/... ÏÔËÒÙ×ÁÅÔÓÑ ÄÌÑ ÂÌÏËÉÒÏ×ÁÎÉÑ, ÔÁË ÞÔÏ ÄÌÑ ËÁÖÄÏÇÏ ÕÄÁÌÅÎÎÏÇÏ ÐÒÉÎÔÅÒÁ ÉÓÐÏÌØÚÕÅÔÓÑ ÏÄÎÏ "×ÉÒÔÕÁÌØÎÏÅ ÕÓÔÒÏÊÓÔ×Ï".
ðÒÉÍÅÒ ÓÏÚÄÁÎÉÑ : touch /dev/ljet4l
3) îÁÐÉÛÉÔÅ ÆÉÌØÔÒ /usr/local/bin/main-filter, Ó ÔÁËÉÍ ÖÅ ÏÂÒÁÚÏÍ ÐÒÅÄÐÏÌÇÁÑ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ljet4l-filter ×ÍÅÓÔÏ cat.
÷ÏÔ ÔÁË ÄÌÑ ÍÅÎÑ.
#! /bin/sh logfile=/var/log/smb-print.log spool_dir=/var/spool/lpd/ljet4l ( echo "print -" /usr/local/bin/ljet4l-filter ) | /usr/bin/smbclient "\\\\SHIR\\HPLJ4" -N -P >> $logfile
P.S. : üÔÏ ÃÉÔÁÔÁ ÉÚ Print2Win mini-Howto Ï ÂÌÏËÉÒÏ×ÁÎÉÉ É ÚÁÞÅÍ ÓÏÚÄÁ×ÁÔØ ×ÉÒÔÕÁÌØÎÙÅ ÐÒÉÎÔÅÒÁ
---îÁÞÁÌÏ ÚÄÅÓØ --------- óÏ×ÅÔ ÏÔ Rick Bressler :
Good tip sheet. I use something very similar. One helpful tip, this is not a particularly good idea:
:lp=/dev/null:\
lpr does an 'exclusive' open on the file you specify as lp=. It does this in order to prevent multiple processes from trying to print to the dame printer at the same time.
The side effect of this is that in your case, eng and colour can't print at the same time, (usually more or less transparent since they probably print quickly and since they queue you probably don't notice) but any other process that tries to write to /dev/null will break!
On a single user system, probably not a big problem. I have a system with over 50 printers. It would be a problem there.
The solution is to create a dummy printer for each. Eg: touch /dev/eng.
I have modified the lp entries in the printcap file above to take into account Rick's suggestion. I did the following:
#touch /dev/eng #touch /dev/colour
---Ends here
--------------------------%<----------------------------------
Adam Neat ( adamneat@ipax.com.au) kindly contributed the following script to back up Windows machines to a Linux host, using the smbclient utility. Adam says that it is used to backup Windows 3.x and NT machines to a Linux based DAT SCSI Drive.
Adam is not proud of the coding style used here, but it works. As I like to say, "If it works and its stupid, then it is not stupid".
In this script, the string 'agnea1' is the username on the Linux machine that does the backups.
#!/bin/bash
clear
echo Initialising ...
checkdate=`date | awk '{print $1}'`
if [ -f "~agnea1/backup-dir/backup-data" ]; then
echo "ERROR: No config file for today!"
echo "FATAL!"
exit 1
fi
if [ -d "~agnea1/backup-dir/temp" ]; then
echo "ERROR: No tempoary directory found!"
echo
echo "Attempting to create"
cd ~agnea1
cd backup-dir
mkdir temp
echo "Directory Made - temp"
fi
if [ "$1" = "" ]; then
echo "ERROR: enter in a machine name (ie: cdwriter)"
exit 1
fi
if [ "$2" = "" ]; then
echo "ERROR: enter in a SMB (Lan Manager) Resource (ie: work)"
exit 1
fi
if [ "$3" = "" ]; then
echo "ERROR: enter in an IP address for $1 (ie:
130.xxx.xxx.52)" exit 1
fi
#############################################################################
# Main Section
#
#############################################################################
cd ~agnea1/backup-dir/temp
rm -r ~agnea1/backup-dir/temp/*
cd ~agnea1/backup-dir/
case "$checkdate"
in
Mon)
echo "Backuping for Monday"
cat backup-data | /usr/local/samba/bin/smbclient
\\\\$1\\$2 -I$3 -N echo "Complete"
if [ -d "~agnea1/backup-dir/Monday" ]; then
echo "Directory Monday Not found ...
making" mkdir
~agnea1/backup-dir/Monday
fi
echo "Archiving ..."
cd ~agnea1/backup-dir/temp
tar -cf monday.tar * echo "done ..."
rm ~agnea1/backup-dir/Monday/monday.tar
mv monday.tar ~agnea1/backup-dir/Monday
;;
Tue)
echo "Backuping for Tuesday"
cat backup-data | /usr/local/samba/bin/smbclient
\\\\$1\\$2 -I$3 -N echo "Complete"
if [ -d "~agnea1/backup-dir/Tuesday" ]; then
echo "Directory Tuesday Not found ...
making" mkdir
~agnea1/backup-dir/Tuesday
fi
echo "Archiving ..."
cd ~agnea1/backup-dir/temp
tar -cf tuesday.tar *
echo "done ..."
rm ~agnea1/backup-dir/Tuesday/tuesday.tar
mv tuesday.tar ~agnea1/backup-dir/Tuesday
;;
Wed)
echo "Backuping for Wednesday"
cat backup-data | /usr/local/samba/bin/smbclient
\\\\$1\\$2 -I$3 -N echo "Complete"
if [ -d "~agnea1/backup-dir/Wednesday" ]; then
echo "Directory Wednesday Not found
... making" mkdir
~agnea1/backup-dir/Wednesday
fi
echo "Archiving ..."
cd ~agnea1/backup-dir/temp
tar -cf wednesday.tar *
echo "done ..."
rm ~agnea1/backup-dir/Wednesday/wednesday.tar
mv wednesday.tar ~agnea1/backup-dir/Wednesday
;;
Thu)
echo "Backuping for Thrusday"
cat backup-data | /usr/local/samba/bin/smbclient
\\\\$1\\$2 -I$3 -N echo "Complete"
if [ -d "~agnea1/backup-dir/Thursday" ]; then
echo "Directory Thrusday Not found ...
making" mkdir
~agnea1/backup-dir/Thursday
fi
echo "Archiving ..."
cd ~agnea1/backup-dir/temp
tar -cf thursday.tar *
echo "done ..."
rm ~agnea1/backup-dir/Thursday/thursday.tar
mv thursday.tar ~agnea1/backup-dir/Thursday
;;
Fri)
echo "Backuping for Friday"
cat backup-data | /usr/local/samba/bin/smbclient
\\\\$1\\$2 -I$3 -N echo "Complete"
if [ -d "~agnea1/backup-dir/Friday" ]; then
echo "Directory Friday Not found ...
making" mkdir
~agnea1/backup-dir/Friday
fi
echo "Archiving ..."
cd ~agnea1/backup-dir/temp
tar -cf friday.tar *
echo "done ..."
rm ~agnea1/backup-dir/Friday/friday.tar
mv friday.tar ~agnea1/backup-dir/Friday
;;
*)
echo "FATAL ERROR: Unknown variable passed for day"
exit 1;;
esac
###########
á×ÔÏÒÓËÉÍÉ ÐÒÁ×ÁÍÉ ÎÁ ÜÔÏÔ ÄÏËÕÍÅÎÔ ×ÌÁÄÅÅÔ David Wood, 1996-9. ïÎ ÍÏÖÅÔ ×ÏÓÐÒÏÉÚ×ÏÄÉÔÓÑ × ÌÀÂÏÊ ÆÏÒÍÅ É Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÔØÓÑ, ÐÒÉ ÓÏÈÒÁÎÅÎÉÉ ÆÁÊÌÁ ÎÅÉÚÍÅÎÎÙÍ, ×ËÌÀÞÁÑ ÜÔÏ ÚÁÑ×ÌÅÎÉÅ.
Brad Marshall ( bmarshall@plugged.net.au) É Jason Parker ( jparker@plugged.net.au) ÎÁÛÅÄÛÉÈ ×ÒÅÍÑ, ÐÒÏÑ×É×ÛÉÈ ÎÁÓÔÏÊÞÉ×ÏÓÔØ, ÎÁÐÉÓÁ×ÛÉÈ ÓËÒÉÐÔ É ÐÒÏ×ÏÄÉ×ÛÉÈ ÜËÓÐÅÒÉÍÅÎÔÙ.
Adam Neat ( adamneat@ipax.com.au) ÐÒÅÄÏÓÔÁ×É×ÛÅÇÏ ÓËÒÉÐÔ ÄÌÑ ÓÏÈÒÁÎÅÎÉÑ ÄÁÎÎÙÈ Ó ÍÁÛÉÎÙ ÐÏÄ Windows ÎÁ ÍÁÛÉÎÕ Ó Linux.
Matthew Flint ( matthew@philtrum.demon.co.uk) ÒÁÓÓËÁÚÁ×ÛÅÍÕ ÍÎÅ Ï ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÎÁÓÔÒÏÊËÉ 'interfaces' × ÆÁÊÌÅ smb.conf.
Oleg L. Machulskiy ( machulsk@shade.msu.ru), Jeff Stern ( jstern@eclectic.ss.uci.edu), Dr. Michael Langner ( langner@fiz-chemie.de and Erik Ratcliffe ( erik@caldera.com) ÐÒÅÄÌÏÖÉ×ÛÉÈ ÉÚÍÅÎÅÎÉÑ × ÒÁÚÄÅÌ Ï ÏÒÇÁÎÉÚÁÃÉÉ ÄÏÓÔÕÐÁ Ë ÐÒÉÎÔÅÒÁÍ Linux ÄÌÑ ÍÁÛÉÎ Ó Windows.
Alberto Menegazzi ( flash.egon@iol.it) ÐÒÅÄÏÓÔÁ×É×ÛÅÍÕ ÍÎÅ ÎÁÓÔÒÏÊËÉ ÄÌÑ MagicFilter, ÞÔÏÂÙ ÏÎ ÍÏÇÕ ÏÂÅÓÐÅÞÉ×ÁÔØ ÄÏÓÔÕÐ Ë ÐÒÉÎÔÅÒÁÍ Windows ÄÌÑ ÍÁÛÉÎ Ó Linux.
Andrea Girotto ( icarus@inca.dei.unipd.it) ÐÏÓÌÁ×ÛÅÍÕ ÍÎÅ ÎÅËÏÔÏÒÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÏÖÅÌÁÎÉÊ ÏÔÎÏÓÉÔÅÌØÎÏ ÄÁÎÎÏÇÏ ÄÏËÕÍÅÎÔÁ.
ôÁËÖÅ ÂÌÁÇÏÄÁÒÀ ×ÓÅÈ ÎÁÃÉÏÎÁÌØÎÙÈ ÐÅÒÅ×ÏÄÞÉËÏ×, ËÏÔÏÒÙÅ ÐÅÒÅÎÅÓÌÉ ÜÔÏÔ ÄÏËÕÍÅÎÔ × ÍÉÒ ÎÅ ÇÏ×ÏÒÑÝÉÊ ÐÏ áÎÇÌÉÊÓËÉ: Takeo Nakano ( nakano@apm.seikei.ac.jp), Klaus-Dieter Schumacher ( Klaus-Dieter.Schumacher@fernuni-hagen.de), Andrea Girotto ( icarus@inca.dei.unipd.it) É ÍÎÏÇÉÈ ÄÒÕÇÉÈ. Ï ËÏÔÏÒÙÈ Ñ ÎÅ ÉÍÅÀ ËÏÎÔÁËÔÎÏÊ ÉÎÆÏÒÍÁÃÉÉ.