/etc/issue

/etc/issue里面命令的描述:


vim /etc/issue

Ubuntu 12.04.3 LTS  \n \l


issue 内的各代码意义
\d 本地端时间的日期;
\l 显示第几个终端机接口; 
\m 显示硬件的等级 (i386/i486/i586/i686...); 
\n 显示主机的网络名称; 
\o 显示 domain name;
\r 操作系统的版本 (相当于 uname -r) 
\t 显示本地端时间的时间; 
\s 操作系统的名称; 
\v 操作系统的版本。
逐条注释 ``` if grep -q "chroot_list_file=/etc/vsftpd/chroot_list" /etc/vsftpd/vsftpd.conf then sed -i '/chroot_list_file=/etc/vsftpd/chroot_list/s/^/#/' /etc/vsftpd/vsftpd.conf echo 'chroot_list_file=/etc/vsftpd/chroot_list' >> /etc/vsftpd/vsftpd.conf else echo 'chroot_list_file=/etc/vsftpd/chroot_list' >> /etc/vsftpd/vsftpd.conf fi if grep -q "anonymous_enable" /etc/vsftpd/vsftpd.conf then sed -i '/anonymous_enable=YES/s/^/#/' /etc/vsftpd/vsftpd.conf sed -i '/anonymous_enable=NO/s/^/#/' /etc/vsftpd/vsftpd.conf echo 'anonymous_enable=NO' >> /etc/vsftpd/vsftpd.conf else echo 'anonymous_enable=NO' >> /etc/vsftpd/vsftpd.conf fi fi touch /etc/vsftpd/chroot_list chmod 750 /etc/vsftpd/chroot_list service vsftpd restart systemctl restart vsftpd.service mv /etc/issue /etc/issue.bak mv /etc/issue.net /etc/issue.net.bak touch /etc/motd chmod 644 /etc/motd rpm -e telnet-server systemctl stop telnet.socket if grep -q "Authorized only. All activity will be monitored and reported" /etc/motd then echo 'have' else echo "Authorized only. All activity will be monitored and reported" >> /etc/motd fi if [ -f "/etc/syslog.conf" ];then echo 'authpriv.* /var/log/secure' >> /etc/syslog.conf echo 'cron.*' >> /etc/syslog.conf echo '*.* @133.64.93.31' >> /etc/syslog.conf service syslog restart fi if [ -f "/etc/rsyslog.conf" ];then echo 'authpriv.* /var/log/secure' >> /etc/rsyslog.conf echo 'cron.*' >> /etc/rsyslog.conf echo '*.* @133.64.97.31' >> /etc/rsyslog.conf service rsyslog restart systemctl restart rsyslog.service fi echo 'ok' ```
07-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值