Fedora12 に samba をインストール
Fedora12ですがWindowsのエクスプローラからファイルアクセスできた方が便利なのでsambaをインストールします。
sambaのインストール
Fedoraのメニューバーから[システム]-[管理]-[ソフトウェアの追加/削除]を選択します。
ソフトウェアの追加/削除が起動したら左上のテキストエリアに「samba」と入力して[Find]ボタンをクリックします。

検索結果が右ペインに表示されるので、その中から「Server and Client software to interoperate with Windows machine」と「Samba server configuration tool」のチェックを入れて[適用(A)]ボタンをクリックします。
rootユーザのパスワードを入力して[認証する(A)]ボタンをクリックします。
インストールが終了したらソフトウェアの追加/削除を終了してください。
共有フォルダの設定
Fedoraのメニューバーから[システム]-[管理]-[Samba]を選択します。
rootユーザのパスワードを入力して[認証する(A)]ボタンをクリックします。
が、Fedora12 と Samba server configuration tool 2.83 の相性がよくないようでエラーになってしまいました。

仕方がないので設定ファイルをコマンドコンソールで修正します。
Fedoraのメニューバーから[アプリケーション]-[システムツール]-[端末]を選択します。
[fedora@fedora ~]$ su -
パスワード:rootユーザのパスワード
これから作る共有フォルダにアクセスする為のユーザを登録します
なおyasuはFedoraにログインしているfedoraユーザを使いたいと思います
[root@fedora ~]# pdbedit -a fedora
new password:fedoraユーザのパスワード
retype new password:fedoraユーザのパスワード
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Unix username: fedora
NT username:
Account Flags: [U ]
User SID: S-1-5-21-430434037-3563575449-1343031599-1000
Primary Group SID: S-1-5-21-430434037-3563575449-1343031599-513
Full Name:
Home Directory: \\fedora\fedora
HomeDir Drive:
Logon Script:
Profile Path: \\fedora\fedora\profile
Domain: FEDORA
Account desc:
Workstations:
Munged dial:
Logon time: 0
Logoff time: never
Kickoff time: never
Password last set: 水, 16 12月 2009 10:41:21 JST
Password can change: 水, 16 12月 2009 10:41:21 JST
Password must change: never
Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ファイル共有の設定をします
[root@fedora ~]# vi /etc/samba/smb.conf
# --------- Netwrok Related Options ---------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
unix charset = UTF-8
dos charset = CP932
display charset = UTF-8
create mask = 0777
force create mode = 0777
security mask = 0777
force security mode = 0777
directory mask = 0777
force directory mode = 0777
directory security mask = 0777
force directory security mode = 0777
fource user = nobody
fource group = nobody
workgroup = MYGROUP
↓
workgroup = WORKGROUP
server string = Samba Server Version %v
↓
server string = Fedora 12
; netbios name = MYSERVER
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.
↓
hosts allow = 127. 192.168.0. 192.168.11.
# --------- Printing Options -----------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option
load printers = yes
↓
load printers = no
cups options = raw
; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups
# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
[public]
comment = fedora
path = /
public = yes
writable = yes
printable = no
write list = +staff
only guest = yes
vfs objects = recycle
recycle:repository = .recycle
recycle:keeptree = no
recycle:versions = yes
recycle:touch = no
recycle:maxsize = 0
recycle:exclude = *.tmp ~$*
viエディタを保存終了([Esc]キーを押し、[:]キー、[q]キー、[w]キーを順に押し[Enter]キーを押す)します
sambaのサービス起動
[root@fedora ~]# /etc/rc.d/init.d/smb start
sambaの自動起動設定
[root@fedora ~]# /chkconfig smb on
[root@fedora ~]# /chkconfig --list smb
smb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
SELinux無効
SELinuxはセキュリティ上非常に有効なのですが、適切に設定するのが難しいのでここでは無効に変更します。
※適切な設定ができる人は適切に設定した方がいいですよ
Fedoraのメニューバーから[システム]-[管理]-[SELinux Management]を選択します。
rootユーザのパスワードを求めれるので入力して[OK(o)]ボタンをクリックします。
SELinux管理者画面が起動したら以下の項目を変更します。
システムデフォルトの強制モード:無効
次の再起動でリラベルにチェックを入れる

これで終了します。
ファイヤーウォールの設定
ファイヤーウォールの設定を行います。
Fedoraのメニューバーから[システム]-[管理]-[ファイヤーウォール]を選択します。
rootユーザのパスワードを求めれるので入力して[承認する(A)]ボタンをクリックします。
信頼したサービスの一覧からSambaを探してチェックを入れて[適用]ボタンをクリックします。

これで設定は終了です。
あとはWindowsのエクスプローラからFedora 12に対してアクセスするとユーザとパスワードを求められるのでfedora/fedoraユーザのパスワードを入力してあげれば共有ができると思います。

































