架設整合 AD 帳號的 Linux FTP and File Serve

在Linux 作業系統,加上 SAMBA 與 VSFTPD ,架設一個可以整合 AD 帳號的 FTP and File Server

架設方法:

OS → CentOS 4.2 (與 Redhat Enterprise 4 Update 2 相等),最小安裝即可

Package → samba , samba-common , vsftpd, 及ntp

1. AD Server 加 /etc/hosts

#vi /etc/hosts
192.168.0.1 dc01 acty.com.tw
192.168.0.2 dc01 acty.com.tw

#vi /etc/resolv.conf
search acty.com.tw
nameserver 192.168.0.1
nameserver 192.168.0.2

設定校時

#ntpdate dc01

#vi /etc/ntp.conf

加入 server dc01

#chkconfig ntpd on
#service ntpd start

使用 setup 設定 Linux 可以吃 AD 帳號

#export LANG=C #設定語係為 C 避免畫面亂掉
#setup

A. 選 Authentication Configuration

B. 把 Use Winbind 及 Use Winbind Authentication 然後按 Next

C. 設定 Winbind Setting

把 Domain , Domain Controllers 及 ADS Realm 填進去。

Template Shell 使用 /sbin/nologin 可讓 User 無法用 telnet 或 ssh 登入系統

D. 需入 Domain Administrator 及 Password 把這台機器加入 AD 的 Domain

1. 建立 User home foder

#vi mknthome.awk

USERLIST=`ls -1d /home/ACTY/p[0-9][0-9][0-9][0-9] | awk ‘{FS="/";print $4}’`
for LIST in `ls -1d /home/ACTY/p[0-9][0-9][0-9][0-9] | awk ‘{FS="/";print $4}’`
do
echo “ACTY\\"$LIST >> /etc/vsftpd/chroot_list
done

exit

3. 檢查所有的服務

設定下列服務開啟

#chkconfig smb on
#chkconfig winbind on
#chkconfig vsftpd on
#chkconfig ntpd on

確認所有服務已啟動,若無請執行下面指令

#service start smb
#service start winbind
#service start vsftpd
#service start ntp

4. 測試

FTP:

ftp://xxx.xxx.xxx.xxx

網路磁碟

\\192.168.0.1\P9999

2 Responses to 架設整合 AD 帳號的 Linux FTP and File Serve

  1. Anonymous says:

    請問 若是這樣將LINUX的FILESERVER建立起來後 要怎麼在資料夾內設定權限?

  2. Youth is not wow gold a time of life;world of warcraft gold it is a state of mind; cheap wow gold it is not a Maple Story Accounts matter of rosy cheeks, red lips and supple knees;mesos it is a matter of the will, a quality of the imagination,wow gold kaufen a vigor of the emotions; it is the freshness wow geld of the deep springs of life.maple story mesos Youth means a tempera-mental predominance of courage over timidity, of the appetite for adventure over the love of ease. This often exists in a man of 60 more than a boy of 20.wow gold farmen Nobody grows old merely by a number of years.maple story money We grow old by deserting our ideals.ms mesos Years may wrinkle the skin, but to give up enthusiasm wrinkles the soul. Worry, fear, self-distrust bows the heart and turns the spring back to dust. Whether 60 or 16, there is in every human being’wow powerleveling s heart the lure of wonder, the unfailing childlike appetite of what’s maple story money next and the joy of the game of living.powerlevel In the center of your heart and my heart there is a wireless station: so long as it receives messages maplestory powerleveling of beauty, hope, cheer,world of warcraft power leveling courage and power from men and from the Infinite

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s

%d 位部落客按了讚: