この情報は古い可能性があります!

ということで?ファイルサーバとしてSAMBAを使いましょう。
プリンタサーバとしては動かさないのでcupsのオプションははずしておきます。

HP: http://www.samba.org/

インストール

cd /usr/local/src
wget ftp://ftp.samba.gr.jp/pub/samba/samba-3.3.4.tar.gz
tar zxvf samba-3.3.4.tar.gz
cd samba-3.3.4/source
./configure \
--prefix=/usr \
--localstatedir=/var \
--with-configdir=/etc/samba \
--libdir=/usr/lib \
--with-modulesdir=/usr/lib/samba \
--with-pammodulesdir=/usr/lib/security \
--with-lockdir=/var/lib/samba \
--with-logfilebase=/var/log/samba \
--with-mandir=/usr/man \
--with-piddir=/var/run \
--with-privatedir=/etc/samba \
--with-swatdir=/usr/share/swat \
--enable-cups \
--with-acl-support \
--with-ads \
--with-automount \
--with-fhs \
--with-pam_smbpass \
--with-libsmbclient \
--with-libsmbsharemodes \
--with-pam \
--with-quotas \
--with-shared-modules=idmap_rid,idmap_ad \
--with-syslog \
--with-utmp \
--with-dnsupdate

make
make install

cp ../packaging/RHEL/setup/smb.init /etc/init.d/smb
cp ../packaging/RHEL/setup/samba.sysconfig /etc/sysconfig/samba
cp ../packaging/RHEL/setup/samba.pamd /etc/pam.d/samba

chmod 755 /etc/init.d/smb
chkconfig --add smb

設定

/etc/samba/smb.conf

[global]
log file = /var/log/samba/%m.log
load printers = no
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
interfaces = 192.168.xx.0/255.255.255.0
hosts allow = 127. 192.168.xx. 192.168.xxx.xxx
winbind use default domain = no
template shell = /bin/false
available = no
dns proxy = no
cups options = raw
browseable = no
server string = SAMBASERVER
workgroup = WWW
os level = 20
socket address = 192.168.xx.xx
printcap name = /etc/printcap
security = user
preferred master = no
max log size = 50
[homes]
comment = Home Directories
read only = No
[test]
comment = test
path = /home/test
read only = No
only user = Yes

起動

/etc/init.d/smb start

SAMBAのユーザ作成

# pdbedit -a -u test
new password: ******
retype new password: ******
Unix username: test
NT username:
Account Flags: [U ]
User SID: x-x-x-xx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxx
Primary Group SID: x-x-x-xx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxx
Full Name:
Home Directory: \\www\test
HomeDir Drive:
Logon Script:
Profile Path: \\www\test\profile
Domain: WWW
Account desc:
Workstations:
Munged dial:
Logon time: 0
Logoff time: Tue, 19 Jan 2038 12:14:07 JST
Kickoff time: Tue, 19 Jan 2038 12:14:07 JST
Password last set: Wed, 26 Jul 2006 11:06:09 JST
Password can change: Wed, 26 Jul 2006 11:06:09 JST
Password must change: Tue, 19 Jan 2038 12:14:07 JST
Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

パスワードの変更

smbpasswd test
New SMB password: *****
Retype new SMB password: *****

ユーザの削除

pdbedit -x -u test

\\192.168.xx.xxにエクスプローラとかでアクセスをすると
IDとパスワードを聞かれます。
作ったIDとパスワードでログインしたら homes
test というディレクトリが見えていればOKです。

デフォルトのログレベルだとログの情報が少ないので
強制ユーザ変更で運用している場合はデバッグレベルを2にすると
どのマシンがどのファイルをいじったというログが残るようになります。

LinuxからWindowsのファイル共有へアクセス

mount -t cifs //xxx.xxx.xxx.xxx/SHAREDRIVE /mnt/FILESERVER -o username=USERNAME

いつも忘れるので。。

コメントを追加

制限付き HTML

  • 使用できるHTMLタグ: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 行と段落は自動的に折り返されます。
  • ウェブページのアドレスとメールアドレスは自動的にリンクに変換されます。
CAPTCHA
半角で
この質問はあなたが人間の訪問者であるかどうかをテストし、自動化されたスパム送信を防ぐためのものです。
ももーい に投稿