📄 inetd.sh
字号:
#! /bin/sh## kill any running samba processes#/etc/killall smbd nmbdchkconfig samba off## add SAMBA deamons to inetd.conf#cp /etc/inetd.conf /etc/inetd.conf.Oif [ $? -ne 0 ]; then exit 1; fiif [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fised -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.conf.O > /etc/inetd.confecho '#SAMBA services' >> /etc/inetd.confecho netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd >> /etc/inetd.confecho netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf## add SAMBA service ports to /etc/services#cp /etc/services /etc/services.Oif [ $? -ne 0 ]; then exit 1; fiif [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fised -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/servicesecho '#SAMBA services' >> /etc/servicesecho 'netbios-ns 137/udp # SAMBA' >> /etc/servicesecho 'netbios-ssn 139/tcp # SAMBA' >> /etc/services## restart inetd to start SAMBA#/etc/killall -HUP inetd
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -