改为: telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd
改完之后用killall -HUP inetd即可生效。
102.如何禁止某个用户的telnet功能,同时他有ftp功能?
: 假设你想把用户ftponly的telnet关掉,
: 1)写一个shell script /bin/ftponly:
: #!/bin/sh
: /bin/cat << XX
: You can only use FTP on this computer,
: but you may not use this account to login.
: Connection will be closed in 10 seconds.
: XX
: /usr/bin/sleep 10
: #end of ftponly
: 2)把用户ftponly的shell设置成/bin/ftponly:
: 到passwd文件,找到对应于ftponly的那行
: ftponly:......:/home/ftponly:/bin/bash,把最后的
: /bin/bash改为/bin/ftponly.
: 3)把 /bin/ftponly 加入到 /etc/shells
: /bin/bash
: /bin/tcsh
: /bin/csh
: /bin/ash
: /bin/zsh
: /bin/ftponly
: 就行了..
--------------
: : 假设你想把用户ftponly的telnet关掉,
: : 1)写一个shell script /bin/ftponly:
: : #!/bin/sh
: : /bin/cat << XX
: ~~
: XX是随便的一个文件名?
这里的XX是个标志,当ftponly试图telnet的时候,屏幕上将显示两个XX之间的内容,
然后10秒以后切断connect.
注:还应该用trap来屏蔽键盘中断吧!否则人家用Ctrl-Z......
103.不用制作启动软盘,直接安装LINUX?
在LINUX光盘中,有一个名为loadlin.exe的DOS软件,其作用是将LINUX核心调入内存,并由LINUX核心代
替当前OS接管计算机,进入LINUX安装例程。
假设用户光驱为F:盘,LINUX核心名为F:\images\vmlinuz,输入以下命令即可不用制作启动软盘,直接
安装LINUX:
loadlin F:\images\vmlinuz root=/dev/ram initrd=F:\images\initrd.img
loadlin软件还有其它选项,以适应不同的硬件配置,如果您有兴趣,可以参阅loadlin文档.
104./proc中的重要信息?
cat /proc/cpuinfo - CPU (i.e. vendor, Mhz, flags like mmx)
cat /proc/interrupts - 中断
cat /proc/ioports - 设备IO端口
cat /proc/meminfo - 内存信息(i.e. mem used, free, swap size)
cat /proc/partitions - 所有设备的所有分区
cat /proc/pci - PCI设备的信息
cat /proc/swaps - 所有Swap分区的信息
cat /proc/version - Linux的版本号
105.怎样让你的硬盘飞起来?
Linux下也可以使用32Bit I/O和DMA。使用/sbin/hdparm -c1 /dev/hda(hdb,hdc..)打开32Bit传输模式,使用
命令 /sbin/hdparm -d1 /dev/hda(hdb,hdc...) 打开DMA。最后使用/sbin/hdparm -k1 /dev/hda 以使硬盘
在Reset之后保持上面的设定,这么一来,硬盘读写速度应该可以提高一倍以上。
106.如何建立符号连结?
ln -s real-file symbolic-file,无论是设备,文档还是脚本程序。
107.grub菜单项丢失,只有字符grub>时的处理方法?
1.grub>cat (hd0,0)/root/grub/grub.conf(为了看参数。)
grub>root (hd0,1)
grub>kernel (hd0,0)/boot/vmlinuz-2.4.18-14 ro root=LABEL=/
grub>initrd (hd0,0)/boot/initrd-2.4.18-14.img
grub>boot
OK! 重启
108.如何安装*.src.rpm文件?
#rpmbuild --rebuild mplayer-0.90pre8.20021004-1.src.rpm
#cd /usr/src/redhat(or other)/RPMS/i386/
#rpm -ivh xxxxx.rpm
上面的方法是对Redhat 8.0以及Mandrake9.0来说的,如果是低于这个版本。应该用
#rpm --rebuild *.src.rpm
