虽然在操作系统的安装过程中可以初步指定一些配置,但很多配置需要在安装后再进行手动配置,操作多了就麻烦,而且容易手误,这个是本人多年来安装配置RHEL时使用的脚本,从RHEL4开始,到RHEL5,因为RHEL6目前手头的项目还未开始,因此,本脚本只适用于RHEL4~RHEL5.
本脚本可实现自动配置主机名,ip地址,掩码,网关,bond0,vsftpd,xdmcp,telnet,及ntp客户端时钟同步。如果对使用过程中的选项不太明白,可直接回车,即按默认选项操作,操作完会有关键信息反馈说明。脚本很简单,对选项不太明白的也可直接查看源码就能懂。
代码一共三个文件
autochg.sh
change_modprobe.conf.sh
change_vsftpd.conf.sh
使用方法:放在同一个目录下,执行./autochg.sh即可
注:建议在刚安装完操作系统后使用本脚本,若在已在线运行或已做过初始化配置的系统上执行本脚本,不保证能100%无错运行,脚本在做配置修改时会自动备份原来的配置文件。
界面概览
Author:$author Host:$host Version:$softversion Revision:$revision
------------------------------------------------------------------------------------
This shell script can do these:
0.modify IP-ADDRESS/BROADCAST/NETMASK
1.modify /etc/hosts
2.modify GATEWAY
---------------------------------------------
3.configure vsftpd (/etc/vsftpd/)
4.configure bond0 for eth0 & eth1
5.configure telnet service
6.configure xdmcp for xmanager(udp port 177)
---------------------------------------------
7.configure ntp client
8.auto active vsftpd,telnet,bond,xdmcp service
plz enter u choice [0,1,2,3,4,5,6,7,8,9,b(back),q(quit),a(all)]:"
脚本代码:
1.autochg.sh
- #!/bin/bash
- LANG=C;export LANG
- menu()
- {
- clear
- author="huangyu"
- host=`hostname`
- softversion=1.6.3
- revision=20090305
- date=`date +%F.%T`
- # less echo,faster speed
- cat <
- ####################################################################################
- Author:$author Host:$host Version:$softversion Revision:$revision
- ------------------------------------------------------------------------------------
- This shell script can do these:
- 0.modify IP-ADDRESS/BROADCAST/NETMASK
- 1.modify /etc/hosts
- 2.modify GATEWAY
- ---------------------------------------------
- 3.configure vsftpd (/etc/vsftpd/)
- 4.configure bond0 for eth0 & eth1
- 5.configure telnet service
- 6.configure xdmcp for xmanager(udp port 177)
- ---------------------------------------------
- 7.configure ntp client
- 8.auto active vsftpd,telnet,bond,xdmcp service
- ####################################################################################
- MENULIST
- echo -n "plz enter u choice [0,1,2,3,4,5,6,7,8,9,b(back),q(quit),a(all)]:"
- read choice
- }
- ####################################################################################
- get_ipaddr()
- {
- ipaddra=`ifconfig -a | grep inet | grep -v inet6 | grep -v 127.0.0.1 | awk '{print $2}'`
- echo "IPADDR=${ipaddra#*:}" >/etc/sysconfig/network-scripts/ifcfg-tmpip
- for i in tmpip bond0 eth0 eth1
- do
- ipaddrb=`grep ^IPADDR /etc/sysconfig/network-scripts/ifcfg-$i 2>/dev/null`
- if [ ! "${ipaddrb#*=}" = "" ]
- then
- ipaddr=${ipaddrb#*=}
- break
- fi
- done
- rm -f /etc/sysconfig/network-scripts/ifcfg-tmpip 2>/dev/null
- if [ "$ipaddr" = "" ]
- then
- echo "this hosts has not a valid ip address"
- while [ "$ipaddr" = "" ]
- do
- echo -n "plz input the address:"
- read ipaddr
- done
- else
- echo -n "plz input the address[$ipaddr]:"
- read ipaddr1
- if [ ! "$ipaddr1" = "" ]
- then
- ipaddr=$ipaddr1
- fi
- fi
- }
- get_brcast()
- {
- brcasta=`ifconfig -a | grep inet | grep -v inet6 | grep -v 127.0.0.1 | awk '{print $3}'`
- echo "BROADCAST=${brcasta#*:}" >/etc/sysconfig/network-scripts/ifcfg-tmpip
- for i in tmpip bond0 eth0 eth1
- do
- brcastb=`grep ^BROADCAST /etc/sysconfig/network-scripts/ifcfg-$i 2>/dev/null`
- if [ ! "${brcastb#*=}" = "" ]
- then
- brcast=${brcastb#*=}
- break
- fi
- done
- rm -f /etc/sysconfig/network-scripts/ifcfg-tmpip 2>/dev/null
- if [ "$brcast" = "" ]
- then
- echo "this hosts has not a valid broadcast"
- while [ "$brcast" = "" ]
- do
- echo -n "plz input the brdcast:"
- read brcast
- done
- else
- echo -n "plz input the brdcast[$brcast]:"
- read brcast1
- if [ ! "$brcast1" = "" ]
- then
- brcast=$brcast1
- fi
- fi
- }
- get_ntmask()
- {
- ntmaska=`ifconfig -a | grep inet | grep -v inet6 | grep -v 127.0.0.1 | awk '{print $4}'`
- echo "NETMASK=${netmaska#*:}" >/etc/sysconfig/network-scripts/ifcfg-tmpip
- for i in tmpip bond0 eth0 eth1
- do
- ntmaskb=`grep ^NETMASK /etc/sysconfig/network-scripts/ifcfg-$i 2>/dev/null`
- if [ ! "${ntmaskb#*=}" = "" ]
- then
- ntmask=${ntmaskb#*=}
- break
- fi
- done
- rm -f /etc/sysconfig/network-scripts/ifcfg-tmpip 2>/dev/null
- if [ "$ntmask" = "" ]
- then
- echo "this hosts has not a valid netmask"
- while [ "$ntmask" = "" ]
- do
- echo -n "plz input the netmask:"
- read ntmask
- done
- else
- echo -n "plz input the netmask[$ntmask]:"
- read ntmask1
- if [ ! "$ntmask1" = "" ]
- then
- ntmask=$ntmask1
- fi
- fi
- }
- c_netinfo()
- {
- ####################################################################################
- echo
- echo -n "Do u want to configure ETH0's IP-ADDRESS?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- if [ -f /etc/sysconfig/network-scripts/ifcfg-bond0 ]
- then
- orifile=/etc/sysconfig/network-scripts/ifcfg-bond0
- newfile=/root/ifcfg-bond0
- device=bond0
- else
- orifile=/etc/sysconfig/network-scripts/ifcfg-eth0
- newfile=/root/ifcfg-eth0
- device=eth0
- fi
- get_ipaddr
- get_brcast
- get_ntmask
- if [ -f $orifile ]
- then
- mv $orifile ${newfile}.`date +%F-%T`
- fi
- echo "DEVICE=$device" >>$orifile
- echo "BOOTPROTO=none" >>$orifile
- echo "ONBOOT=yes" >>$orifile
- echo "IPADDR=$ipaddr" >>$orifile
- echo "BROADCAST=$brcast" >>$orifile
- echo "NETMASK=$ntmask" >>$orifile
- echo
- echo "the old $orifile has been backup to ${newfile}.`date +%F`"
- echo "the new $orifile's content is:"
- echo
- cat $orifile
- echo
- #echo -n "plz enter u choice[0,1,2,3,4,5,6,7,8,9,b(back),q(quit)]:"
- #read choice
- fi
- echo
- }
- c_gateway()
- {
- ####################################################################################
- echo -n "Do you want to configure GATEWAY?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- orifile=/etc/sysconfig/network
- newfile=/root/network
- if ! grep GATEWAY $orifile >/dev/null
- then
- while [ "$gw" = "" ]
- do
- echo -n "plz enter GATEWAY:"
- read gw
- done
- else
- echo -n "`grep GATEWAY $orifile`,plz enter new GW:"
- read gw
- fi
- if [ ! "$gw" = "" ]
- then
- #sed "/GATEWAY/d" $orifile | sed "$ a\GATEWAY=$gw" >$newfile
- #the bellow line is better,more fast
- (sed "/GATEWAY/d" $orifile;echo GATEWAY=$gw) >$newfile
- cp $newfile $orifile
- fi
- echo
- echo "the new $orifile file's content:"
- echo
- cat $orifile
- echo
- fi
- echo
- }
- c_hosts()
- {
- ####################################################################################
- echo -n "Do you want to configure /etc/hosts file?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- get_ipaddr
- cp /etc/hosts /root/hosts.`date +%F-%T`
- sed "/127.0.0.1/s/$HOSTNAME//" /etc/hosts | sed "/$ipaddr/d" \
- | sed "$ a\\$ipaddr $HOSTNAME" >/root/hosts
- cp /root/hosts /etc/hosts
- echo "the new /etc/hosts file's content:"
- echo
- cat /etc/hosts
- echo
- fi
- echo
- }
- c_vsftpd()
- {
- #################################################################################
- echo "Do you want to configure vsftpd?[y|n]"
- echo " 1.disable anonymous user access"
- echo " 2.lock user in his home directory"
- echo " 3.change vsftp's running type to be standalone or a xinetd service"
- echo " and first time u don't need to assign it."
- echo
- echo -n "Do you want to configure vsftpd?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- echo "========== begin to modify /etc/vsftpd/vsftpd.conf ==========="
- echo
- filename=/etc/vsftpd/vsftpd.conf
- newfile=/root/vsftpd.conf
- cmdfile=${0%%/*}/change_vsftpd.conf.sh
- if [ -d /etc/vsftpd ]
- then
- echo -n "do u want vsftpd to be a xinetd service? default is ignore. [y|n|i]:"
- read se_type
- $cmdfile $filename >$newfile
- cp $filename $filename.`date +%F-%T`
- if [ "$se_type" = "y" ];then
- service vsftpd stop
- sed "s/^listen=YES/listen=NO/" $newfile >$filename
- sed "/disable/c\ disable = no" /usr/share/doc/vsftpd*/vsftpd.xinetd >/etc/xinetd.d/vsftpd
- elif [ "$se_type" = "n" ];then
- service vsftpd stop
- sed "s/^listen=NO/listen=YES/" $newfile >$filename
- rm /etc/xinetd.d/vsftpd
- else
- cp $newfile $filename
- fi
- awk -F':' '($3>=500&&$3<600){print $1}' /etc/passwd > /etc/vsftpd/chroot_list
- #use sed can do also. but up-line is good.
- #sed -n "`sed -n '/500:500/=' /etc/passwd`,$ p" /etc/passwd \
- # | awk -F : '{print $1}' > /etc/vsftpd/chroot_list
- echo "the original file is bakup to $filename.`date +%F`..."
- echo
- echo "the key point:"
- echo
- echo "`grep anonymous_enable $filename`"
- echo "`grep chroot $filename`"
- if [ "$se_type" = "y" ];then echo "`grep ^listen $filename`";fi
- echo
- echo "the /etc/vsftpd/chroot_list file's contenti:"
- cat /etc/vsftpd/chroot_list
- else
- echo "you have not insatlled vsftpd service."
- echo "waiting 3 seconds..."
- sleep 3
- continue
- fi
- echo
- echo -n 'do u want to permit "root" user using vsftp? default is ignore. {y|n} [n]: '
- read ftp_type
- if [ "$ftp_type" = "y" ];then
- #-------for RHEL 4---------------------
- if [ -f /etc/vsftpd.ftpusers ]; then sed -i "/root/ c\#root" /etc/vsftpd.ftpusers; fi
- if [ -f /etc/vsftpd.user_list ]; then sed -i "/root/ c\#root" /etc/vsftpd.user_list; fi
- #-------for RHEL 5---------------------
- if [ -f /etc/vsftpd/ftpusers ]; then sed -i "/root/ c\#root" /etc/vsftpd/ftpusers; fi
- if [ -f /etc/vsftpd/user_list ]; then sed -i "/root/ c\#root" /etc/vsftpd/user_list; fi
- else
- #-------for RHEL 4---------------------
- if [ -f /etc/vsftpd.ftpusers ]; then sed -i "/#root/ c\root" /etc/vsftpd.ftpusers; fi
- if [ -f /etc/vsftpd.user_list ]; then sed -i "/#root/ c\root" /etc/vsftpd.user_list; fi
- #-------for RHEL 5---------------------
- if [ -f /etc/vsftpd/ftpusers ]; then sed -i "/#root/ c\root" /etc/vsftpd/ftpusers; fi
- if [ -f /etc/vsftpd/user_list ]; then sed -i "/#root/ c\root" /etc/vsftpd/user_list; fi
- fi
- echo "The configuration of vsftp about root user has been changed successful."
- fi
- echo
- }
- c_bond()
- {
- ###########################################################################
- echo -n "Do you want to configure modprobe.conf for bonding?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- echo "========== begin to modify /etc/modprobe.conf ==========="
- echo
- #sleep 1
- filename=/etc/modprobe.conf
- newfile=/root/modprobe.conf
- cmdfile=${0%%/*}/change_modprobe.conf.sh
- grep bond0 /etc/modprobe.conf >/dev/null
- if [ $? = 1 ]
- then
- echo -n "Plz input the bonding mode,default is 1.[1|0]"
- read bmode
- if [ "$bmode" = "" ];then bmode=1;fi
- $cmdfile $filename >$newfile
- mv $filename $filename.`date +%F-%T`
- sed "s/mode=0/mode=$bmode/" $newfile >$filename
- echo "$filename has been modified."
- echo "the original file is bakup to $filename.`date +%F`..."
- else
- echo "this hosts has been using bonding mode,nothing to changed."
- echo "the $filename file's content:"
- cat /etc/modprobe.conf
- fi
- echo
- echo
- orieth0=/etc/sysconfig/network-scripts/ifcfg-eth0
- orieth1=/etc/sysconfig/network-scripts/ifcfg-eth1
- oribond=/etc/sysconfig/network-scripts/ifcfg-bond0
- neweth0=/root/ifcfg-eth0
- neweth1=/root/ifcfg-eth1
- newbond=/root/ifcfg-bond0
- if [ -f $oribond ]
- then
- cp $oribond $newbond.`date +%F-%T`
- fi
- if [[ ! ( ! "$ipaddr" = "" && ! "$brcast" = "" && ! "$netmask" = "" ) ]]
- then
- get_ipaddr
- get_brcast
- get_ntmask
- fi
- echo "DEVICE=bond0" >$oribond
- echo "BOOTPROTO=none" >>$oribond
- echo "ONBOOT=yes" >>$oribond
- echo "IPADDR=$ipaddr" >>$oribond
- echo "BROADCAST=$brcast" >>$oribond
- echo "NETMASK=$ntmask" >>$oribond
- if [ -f $orieth0 ]
- then
- mv $orieth0 $neweth0.`date +%F-%T`
- fi
- if [ -f $orieth1 ]
- then
- mv $orieth1 $neweth1.`date +%F-%T`
- fi
- echo "DEVICE=eth0" >>$orieth0
- echo "BOOTPROTO=none" >>$orieth0
- echo "ONBOOT=yes" >>$orieth0
- echo "MASTER=bond0" >>$orieth0
- echo "SLAVE=yes" >>$orieth0
- echo "DEVICE=eth1" >>$orieth1
- echo "BOOTPROTO=none" >>$orieth1
- echo "ONBOOT=yes" >>$orieth1
- echo "MASTER=bond0" >>$orieth1
- echo "SLAVE=yes" >>$orieth1
- echo
- echo "cat $oribond"
- cat $oribond
- echo
- echo "cat $orieth0"
- cat $orieth0
- echo
- echo "cat $orieth1"
- cat $orieth1
- echo
- fi
- echo
- }
- c_telnet()
- {
- ############################################################################
- echo -n "Do you want to configure telnet service?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- orifile=/etc/xinetd.d/telnet
- newfile=/root/telnet
- echo "========== begin to modify $orifile ==========="
- echo
- if [ -f $orifile ]
- then
- cp $orifile $newfile.`date +%F-%T`
- sed "/disable/c\ disable = no" $orifile >$newfile
- cp $newfile $orifile
- echo "the new telnet file content:"
- echo
- cat $orifile
- else
- echo "you have not install telnet service"
- fi
- echo
- fi
- echo
- echo -n "Do you want to permit root using telnet to login the system? {y|n} [n] "
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- pts_counts=$(grep pts /etc/securetty |wc -l)
- if [ $pts_counts -eq 0 ]
- then
- echo pts/1 >>/etc/securetty
- echo pts/2 >>/etc/securetty
- echo pts/3 >>/etc/securetty
- echo pts/4 >>/etc/securetty
- echo pts/5 >>/etc/securetty
- echo "the /etc/securetty file has been changed now."
- echo "Permit total 5 root accounts direct using telnet to login to system concurrent."
- else
- echo "the current configuration has permit root direct login to the system."
- echo "and the max concurrent number is $pts_counts."
- echo "nothing has changed."
- fi
- echo
- fi
- echo
- }
- c_xdmcp()
- {
- ############################################################################
- echo -n "Do you want to configure remote x-windows service?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- version=`sed -n "/release 4/p" /etc/redhat-release | wc -l`
- if [ $version = 1 ]
- then
- oritab=/etc/inittab
- newtab=/root/inittab
- origdm=/etc/X11/gdm/gdm.conf
- newgdm=/root/gdm.conf
- echo "========== begin to modify $oritab & $origdm ==========="
- echo
- if grep ^x:5:respawn:/usr/bin/gdm $oritab >/dev/null
- then
- echo "the $oritab has been configured.no need configure more"
- else
- cp $oritab $newtab.`date +%F-%T`
- sed "/x:5:respawn/c\x:5:respawn:\/usr\/bin\/gdm" $oritab >$newtab
- cp $newtab $oritab
- echo "the new $oritab 's content changed:"
- echo " x:5:respawn:/usr/bin/gdm"
- echo
- fi
- if [ -f $origdm ]
- then
- cp $origdm $newgdm.`date +%F-%T`
- #enum=(`sed -n "/^Enable=/ =" $origdm`)
- #xnum=(`sed -n "/^\[xdmcp\]/ =" $origdm`)
- #sed "${enum[0]} c\Enable=true" $origdm >$newgdm
- sed "`sed -n '/^Enable=/=' $origdm | sed -n '1p'` c\Enable=true" $origdm >$newgdm
- cp $newgdm $origdm
- echo "the new ${origdm} 's content:"
- echo " the line ${enum[0]} has been change to 'Enable=true'"
- else
- echo "you have not install X11 service"
- fi
- else
- #oritab=/etc/inittab
- #newtab=/root/inittab
- origdm=/etc/gdm/custom.conf
- newgdm=/root/custom.conf
- echo "========== begin to modify $oritab & $origdm ==========="
- echo
- if [ -f $origdm ]
- then
- cp $origdm $newgdm.`date +%F-%T`
- sed -i '/^\Enable=/d' $origdm
- sed -i '/^\[xdmcp\]/ a\Enable=true' $origdm
- sed -i '/^\AllowRemoteRoot/d' $origdm
- sed -i '/^\[security\]/ a\AllowRemoteRoot=true' $origdm
- gdmgreeter=$(grep 'RemoteGreeter=/usr/libexec/gdmgreeter' /etc/gdm/custom.conf|wc -l)
- if [ $gdmgreeter = 0 ]
- then
- sed -i '/^\[daemon\]/ a\RemoteGreeter=/usr/libexec/gdmgreeter' $origdm
- fi
- echo "the new ${origdm} has been changed by follow:"
- echo " Enable=true"
- echo " AllowRemoteRoot=true"
- else
- echo "you have not install X11 service"
- fi
- echo
- echo "NOTE:"
- echo "your redhat linux system version is 5."
- echo "if this configuration can not work after system reboot,"
- echo "you can restore the original file from /root/ directory"
- echo "then login to the GUI, run gdmsetup"
- echo "or"
- echo "click 'system->management-->login screen'"
- echo "then,click 'remote' and 'secure' tab to configure xdmcp"
- fi
- echo
- fi
- echo
- }
- c_ntp()
- {
- ############################################################################
- echo -n "Do you want to configure ntp client?[y|n]"
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- orifile=/var/spool/cron/root
- newfile=/root/root
- if [ -f $orifile ]
- then
- sed "/ntpdate/d" $orifile > $newfile
- else
- touch $orifile
- fi
- if grep ntpdate $orifile > /dev/null
- then
- for i in `sed -n '/ntpdate/p' $orifile | awk '{print $7}'`
- do
- ((num++))
- echo -n "enter the new ntp server ip-addr. server $num's ip [$i]:"
- #read ntpip[$num]
- read ntpip
- if [ "$ntpip" = "" ]
- then
- ntpip=$i
- fi
- echo "$num * * * * /usr/sbin/ntpdate $ntpip" >> $newfile
- done
- unset num
- else
- echo "you can assign max three ntp server's ip!"
- echo
- for ((i=0;i<3;i++))
- do
- echo -n "enter the new ntp server ip-addr:"
- read ntpip
- if [ ! "$ntpip" = "" ]
- then
- echo "$i * * * * /usr/sbin/ntpdate $ntpip" >> $newfile
- fi
- done
- fi
- cp $newfile $orifile
- echo
- echo "the new root's crontab is"
- crontab -l
- echo
- fi
- echo
- }
- c_autostart()
- {
- ############################################################################
- echo -n "Do you want to active vsftpd service now? {y|n} [n] "
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- if [ "$se_type" = "y" ];then
- service xinetd restart
- else
- chkconfig vsftpd on
- service vsftpd restart
- fi
- fi
- echo
- ############################################################################
- echo -n "Do you want to active telnet service now? {y|n} [n] "
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- service xinetd restart
- fi
- echo
- ############################################################################
- echo -n "Do you want to active bonding now? {y|n} [n] "
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- service network restart
- fi
- echo
- ############################################################################
- echo "Caution:the following operation will cause you log out the GUI destop!"
- echo -n "Do you want to active xdmcp now? {y|n} [n] "
- read myselect
- if [[ "$myselect" = "y" || "$myselect" = "Y" ]]
- then
- unset myselect
- clear
- /usr/sbin/gdm-restart
- echo "the xdmcp/gdm has been restart."
- fi
- echo
- }
- ############################################################################
- for ((i=1;;i++))
- do
- menu
- case "$choice" in
- "0")
- c_netinfo
- ;;
- "1")
- c_hosts
- ;;
- "2")
- c_gateway
- ;;
- "3")
- c_vsftpd
- ;;
- "4")
- c_bond
- ;;
- "5")
- c_telnet
- ;;
- "6")
- c_xdmcp
- ;;
- "7")
- c_ntp
- ;;
- "8")
- c_autostart
- ;;
- "9")
- ;;
- "a")
- c_netinfo
- c_gateway
- c_hosts
- c_vsftpd
- c_bond
- c_telnet
- c_xdmcp
- c_ntp
- c_autostart
- exit 0
- ;;
- "b")
- unset choice
- ;;
- "q")
- exit 0
- ;;
- esac
- if [ ! "$choice" = "" ]
- then
- echo "press any key to return!"
- read
- fi
- done
2
- #!/bin/sed -f
- $ a\alias bond0 bonding\
- options bond0 miimon=100 mode=0
3
- #!/bin/sed -f
- #to call:sripte_name /etc/vsftpd/vsftpd.conf
- /anonymous_enable=YES/ c\anonymous_enable=NO
- /#chroot_list_enable=YES/ c\#orig_line chroot_list_enable=YES\
- chroot_local_user=YES
- /chroot_list_file=\/etc\/vsftpd/ c\chroot_list_file=\/etc\/vsftpd\/chroot_list
其实,后2个辅助脚本完全可以融合在主脚本中,懒得的修改了,浅薄之作,望不吝赐教~
阅读(844) | 评论(0) | 转发(0) |