3. For single-user boot plus password Add three parameters to "/etc/lilo.conf" file: Time-out,restricted,password. These three parameters allow your system to require a password verification when you start Lilo. a): Edit the lilo.conf file (vi/etc/lilo.conf), if or change these three parameters: boot=/dev/hda map=/boot/map install= /boot/boot.b time-out=00 #把这行该为00 prompt default=linux ######### #加入这行 restricted ######### #加入这行并设置自己的密码 password= image=/boot/vmlinuz-2.2.14-12 label=linux initrd=/boot/ INITRD-2.2.14-12.IMG ROOT=/DEV/HDA6 READ-ONLY  B): Because the "/etc/lilo.conf" file contains the plaintext password, So you have to set it to root permission to read. [root]# chmod 600/etc/lilo.conf c): Updates the system so that modifications to the "/etc/lilo.conf" file take effect. [root]#/sbin/lilo-v d): Use the "chattr" command to make the "/etc/lilo.conf" file immutable. [root]# chattr +i/etc/lilo.conf 4, disable control-alt-delete keyboard close command comment out the following line in the "/etc/inittab" file: #ca:: Ctrlaltdel:/sbin/shutdown-t3-r now in order to make this change work, enter the following command: [root]#/sbin/init q Second, hidden system information 1, in the default case, when logging on to the Linux system, the system back to print out the version of the Linux system, the name of the kernelServices and other information. So we need to modify it so that he only displays one login: Login symbol Edit/etc/rc.d/rc.local, add the comment symbol # to the line below, and comment out the lines of the output message: #This will overwrite/ Etc/issue at every boot.so,make no changes you #want to make to/etc/issue here or you'll lose them when you Reboo t. #echo "" >/etc/issue #echo $R ">>/etc/issue #echo" Kernel $ (uname-r) on $a $ (uname-m) ">& gt;/etc/issue # #cp-F/etc/issue/etc/issue.net #echo >>/etc/issue (2): delete/ Issue.net and issue files under the ETC directory. [boot] #rm-F/etc/issue [boot] #rm-F/etc/issue.net [root]# touch/etc/issue [root]# Touch /etc/issue 2, when someone remotely logged in, suppress the display system welcome information. You can do this by modifying the "/etc/inetd.conf" file. put/etc/inetd.conf file under this line: telnet stream TCP nowait ROOT/USR/SBIN/TCPD in.telnetd Modified to: telnet stream TCP nowait ROOT/USR/SBIN/TCPD in.telnetd-h at the end of the last add "-H" can make when someone logged on only display a login: hint, The system welcome information is not displayed. 3, History command Bash Shell in "~/.bash_history" ("~/") represents the user account500 used commands, which makes it easy to enter long commands that you have used. Each user who has an account in the system has a ". Bash_history" file in his directory. The bash shell should keep a small number of commands and delete these historical commands each time the user logs off. (1) the "Histfilesize" and "histsize" lines in the "/etc/profile" file determine the number of old command bars that can be saved in the. bash_history file for all users. Set the value of the "Histfilesize" and "histsize" lines in the "/etc/profile" file to a smaller number. Edit the profile file (vi/etc/profile) and change the following line to: histfilesize=30//set to 30 HISTSIZE=30//Do not place histsize zero, You can't use the upper and lower keys to invoke the history command This means that each user's ". Bash_history" file can only hold 30 old commands. (2) in the "/etc/skel/.bash_logout" file, add the following line "Rm-f $HOME/.bash_history". This allows the ". Bash_history" file to be deleted each time the user logs off.
Linux security Settings