Sambaメモ
Samba周りをいじっていたので、少しメモ
Sambaを使って共有フォルダを使うときは、個別のアカウントよりもGuestアカウントの方がよさげ
アクセス権やらなにやらでめんどくさくなる模様
smb.confで"guest only = yes"にしておくと、全てGuestアカウント経由になるらしい
Guestアカウントは、デフォルトでnobody
# cd /usr/local/etc # vim smb.conf
# Uncomment this if you want a guest account, you must add this to /etc/passwd # otherwise the user "nobody" is used ; guest account = pcguest … 中略 … [share] comment = Share Folder path = /home/share public = yes writable = yes printable = no guest only = yes guest ok = yes guest account = nobody
また、Sambaのアカウントを追加する際に、smbldap-toolsを使うと少し便利
オプションを色々選択するので、ユーザをたくさん追加する場合はシェルスクリプトを作成しておくといい
パスワードの暗号形式も選択できる
# cd /usr/local/etc/smbldap-tools # vim smbldap.conf
# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT) hash_encrypt="SSHA"
CLEARTEXTにしておくと、パスワードが平文になるので、だだ漏れになる
あとは、ldap.confのパスワードの形式も合わせておく
# cd /usr/local/etc # vim ldap.conf
pam_password ssha
メモおわり!