Sambaのインストール(Puppy Linux)
Sambaとは、UnixをWindowsのファイルサーバーにするソフトウェアです。Sambaをインストールすることによって、Windowsのエクスプローラ上でファイルのやりとりが出来るようになります。
Sambaには、Version4がありますが、機能がたくさんあり、設定が難しかったので諦め、Version3をインストールすることにしました。
デスクトップ上の「インストール」アイコンをクリックします。

「パッケージマネージャを実行するにはこのボタン:」をクリックします。

検索ボックスに「samba」と入力し、「実行」をクリックします。

「すべてのレポジトリ内を検索」側の検索ボタンをクリックします。

OKをクリックします。

「samba_3.6.25」をクリックします。

依存しているパッケージ全てをインストールするために、「依存パッケージを調べる」をクリックします。

「ダウンロードしてインストール」をクリックします。

ダウンロードするサイトを選択し、「パッケージをダウンロード」をクリックします。

OKをクリックします。もし、インストール先を節約したい場合は「ダイエット」をクリックします。

Okをクリックします。

インストール済みパッケージに「samba_3.6.25」および依存しているパッケージが追加されました。「パッケージマネージャを終了」をクリックします。
次にSambaの設定ファイル/etc/samba/smb.confを編集します。
- workgroupをネットワークのワークグループ名に変更します。
- シンボリックリンク先が見られるように以下の2行を[global]セクションに追加します。
wide links = yes
unix extensions = no - 共有するフォルダを追加するため、以下を追加します。
[mnt] ←Windows上のフォルダ名 comment = "Add Samba directory test" ←コメント。詳細表示にすると表示されます。 path = /mnt ←共有するフォルダのパス writable = yes ←書き込み可能に設定
# This is an example smb.conf for a simple Samba-TNG setup. # Please read SETUP-with-ldap.txt before! # You can either find this in the distribution in docs/textdocs/ # or in the doc-directory for samba-tng in your distribution. # [global] # If you want to automatically load your printer list rather # than setting them up individually then you'll need this load printers = yes # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names # via DNS nslookups. dns proxy = no # Put a capping on the size of the log files (in Kb). max log size = 50 # Security mode. Most people will want user level security. See # security_level.txt for details. security = user # Domain and Server # ------------------- # # The value of the attribute workgroup describes the domain or # workgroup name. You MUST NOT set up two domain controllers (PDC) # in one single network environment with the same workgroup-/ domain # name!!! workgroup = workgroup server string = Samba-TNG Server # Your server should not have a netbios name which is already present # in the network. The default is to use the (Linux-) hostname of the # server. If you want to change that, use the 'netbios name' option: ; netbios name = tng-srv # If your TNG server should act as a primary domain controller # (PDC) set: ; domain master = yes ; domain logons = yes # Beware! You MUST NOT have any other PDC in the same # domain! domain master = no domain logons = no # If you want TNG to act as PDC you need at least one # wins server. Set: ; wins support = yes # ...so TNG will become a wins server - the default value is 'no' # If you already have a running wins server, use: ; wins server = xxx.xxx.xxx.xxx # LDAP # ------ # # TNG can use one of two different back-ends for user # data: smbpasswd or LDAP. The LDAP backend is the most # flexible and elaborated - it's strongly recommended # to use this one! # Note: if you want to use LDAP with ssl, change # LDAP uri into ldaps://... # An example for basic LDAP settings in smb.conf looks # like this: ; ldap uri = ldap://127.0.0.1 ; ldap suffix = dc=tng,dc=org ; ldap bind as = cn=root,dc=tng,dc=org ; ldap passwd file = /etc/samba-tng/ldapsecret # Warning: Setting 'ldap delete dn' to 'yes' will delete a complete # user from the directory service - not only the samba-tng related # attributes! Anyway, user files will not be deleted. ; ldap delete dn = yes # Profile and User # ------------------ # # Attention: # The following four options ('logon home', # 'logon drive', 'logon path' and 'logon script') may be overridden # by the user's LDAP attributes. # The home-directory of the user is default: ; logon home = \\%N\%U # On the workstation side the logon drive will be mounted and assigned # with a letter. This letter has to be an unused one - check your # workstations for a free one to avoid collisions! ; logon drive = h: # If you want to use roaming profiles, set the default here - if you # do not want to use it, leave the following commented out. ; logon path = \\%N\profiles\%U # You may want to use a logon script (set time, connect other shares). # Notice: This path is relative to the netlogon share! ; logon script = start.bat # Others # -------- # If things do not work right, increase the log level to get more # debugging information. Log level 2 is a "good choice". ; log level = 2 # for security reasons set write access default to no: ; writable = no # symbol link for windows wide links = yes unix extensions = no ;[netlogon] ; comment = "Logonscripts and other profile data" ; path = /etc/samba-tng/netlogon [homes] comment = "Home directory for %U" writable = yes # For roaming profiles you need a special share. This example # needs a a+wt directory (chmod 1777 /home/nt-profiles): ;[profiles] ; path = /home/nt-profiles ; writable = yes ; create mask = 700 ; directory mask = 700 [mnt] comment = "Add Samba directory test" path = /mnt writable = yes [printers] comment = All Printers browseable = no # Set public = yes to allow user 'guest account' to print guest ok = no writable = no printable = yes
以下のコマンドを実行し、Sambaユーザにrootを追加し、パスワードを設定します。
smbpasswd -a root |
以下のコマンドを実行し、nmbdとsmbdを開始します。
nmbd smbd |

Windowsのエクスプローラでネットワークを見ます。

Linuxパソコンが見えています。CF-R3_PUPPYをダブルクリックします。

ユーザ名にroot、パスワードに先ほど設定したパスワードを入力し、OKをクリックします。

Home directoryがhomesとrootの2つ出来ていますが、まぁOKとします。
| 固定リンク
「Puppy Linux」カテゴリの記事
- minidlnaのインストール(Puppy Linux)(2016.09.08)
- ファイアーウォールの設定・プライベートIPアドレス(Puppy Linux)(2016.09.08)
- 自動起動の設定(Puppy Linux)(2016.07.08)
- マウントの設定(Puppy Linux)(2016.07.08)
- ファイアーウォールの設定・ポート毎(Puppy Linux)(2016.07.08)
コメント