SAMBA設定 · 1 min read · Dec 11, 2025
Samba Domaincontroller For Small Workgroups With SWAT On Fedora 8 - Page 2
4.3 CUPS
GUIのないサーバーを設定する場合、CUPSウェブインターフェースを使用するためにIP設定を編集する必要があります。%vm_ip%をあなたのVMのIP(例:192.168.0.100)に、%workstation_ip%をCUPSウェブインターフェースにアクセスするために使用するワークステーションのIPに置き換えます。
vi /etc/cups/cupsd.conf変更:
Listen localhost:631を:
Listen %vm_ip%:631変更:
# Restrict access to the server...
Order allow,deny
Allow localhost
# Restrict access to the admin pages...
Encryption Required
Order allow,deny
Allow localhost
# Restrict access to configuration files...
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow localhost
を:
# Restrict access to the server...
Order allow,deny
Allow localhost
Allow %workstation_ip%
# Restrict access to the admin pages...
Encryption Required
Order allow,deny
Allow localhost
Allow %workstation_ip%
# Restrict access to configuration files...
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow localhost
Allow %workstation_ip%
次に、CUPSウェブインターフェース用のSSL証明書を作成します:
openssl req -new -x509 -keyout /etc/cups/ssl/server.key \
-out /etc/cups/ssl/server.crt -days 365 -nodesその後、CUPSを再起動します:
/etc/init.d/cups restartこれで、ワークステーションからCUPSウェブインターフェースを介してCUPSプリンターを管理できるようになります。お好みのブラウザでhttps://%vm_ip%:631/を開き、rootとしてログインしてください。プリンターに利用可能なLinuxドライバーがない場合、SAMBAを介してWindowsワークステーションからのみこのプリンターを使用したい場合は、プリンターメーカーの「RAW」を使用し、Windowsワークステーションに正しいドライバーをインストールできます。
HPプリンターを設定する場合は、hplip(コマンドライン)を介してCUPSに追加する必要があります。正確なコマンドはデバイスの接続タイプによって異なります - 「hp-setup –help」を参照してください。例:IP 192.168.0.20のネットワークプリンターの場合、コマンドは「hp-setup -i 192.168.0.20」です。その後、CUPSウェブインターフェース内でプリンター設定(解像度など)を調整できます。
新しいプリンターをCUPSに追加した後、次のコマンドでSambaに追加する必要があります。
cupsaddsmb -a4.4 Quota
次に、クォータ使用のためにシステムを準備します。
vi /etc/fstabルートパーティションの行にusrquotaとgrpquotaを追加します。オプションは次の行のようになります:
/dev/VolGroup00/LogVol00 / ext3 defaults,usrquota,grpquota 1 1その後、クォータ設定のためのファイルを作成し、ルートパーティションを再マウントします。
touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
quotacheck -avugm
quotaon -avug注意: quotacheck -avugmを初めて実行すると、次のようなエラーが表示されます:
quotacheck: WARNING - Quotafile //aquota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING - Quotafile //aquota.group was probably truncated. Cannot save quota settings...これは正常であり、心配する必要はありません。ユーザーのためにクォータを使用する方法は、後でこのハウツーでSambaドメインにユーザーを追加する際に説明します。
4.5 Hosts
サーバーのhostsファイルにホストのIPとワークグループのすべてのコンピュータを追加します。
vi /etc/hosts次のようになります:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.100 server1.example.com server1
192.168.0.110 workstation1
192.168.0.111 workstation2
192.168.0.112 workstation3
::1 localhost6.localdomain6 localhost64.6 Services
必要なサービスの自動起動を有効にします。
chkconfig smb on
chkconfig nmb on
chkconfig winbind on
chkconfig swat onその後、システムを再起動します。
reboot新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。