Monday, February 7, 2011

GNOME File Manager will join the tabbed browsing

Linux desktop GNOME's file manager, Nautilus, allegedly will add similar browser tabbed browsing feature.

Nautilus many areas need to be updated, in which the user maximum requirements is tabbed browsing, so developers will be the first time to join this feature. Basic allegedly has now joined this feature, just some small fixes and testing needs to be done, but also join the Alt + number key shortcuts. The new Nautilus will together with GNOME2.24 in September. And friends can first try to support the functionality of the Windows PCManFileManager also can use QTTabBar. Download source code: http://svn.gnome.org/viewvc/nautilus/branches/multiview/dependent libbackground download: http://svn.gnome.org/svn/gnome-control-center/tags/gnome_control_center_2_22_0/libbackground/

Non-fixed IP in Ubuntu shelves NAT + DHCP

Then don't forget 「introduction # sudogedit/etc/default/dhcp3-server 」, and modify 「introduction INTERFACES = "" 」 into 「introduction INTERFACES = "eth1" 」.

Finally a difficult step is to modify 「introduction/etc/dhcp3/dhcpd.conf 」, however when I labored, open Firestarter and DHCP and NAT setting (I selected 「introduction CreatnewDHCPconfiguration 」), then back to 「introduction/etc/dhcp3/dhcpd.conf 」, inside of the content is not what I refer to the birds of Costa hard to break into, but the set, Firestarter dexterity than I even less, province of several B capacity. # DHCPconfigurationgeneratedbyFirestarterddns-update-styleinterim; ignoreclient-updates; subnet192.168.1.0netmask255.255.255.0 {optionrouters192.168.1.2; optionsubnet-mask255.255.255.0; optiondomain-name-servers168.95.1.1; # Chunghwa Telecom's DNS address optionip-forwardingof; rangedynamic-bootp192.168.1.30192.168.1.50; # automatically assign IP range default-lease-time21600; max-lease-time43200;} Don't forget to perform 「introduction # sudo/etc/init.d/dhcp3-serverrestart 」 if you share with me too lazy to own set iptables, the next super easy. Please install Firestarter, remember to suite the Universe in the library. The following settings if you want to reference pictures, see below URL. Firestarter-> Preferences – > NetWorkSettings, connect Ethernet of 「introduction Internetconnectednetworkdevice 」 select ppp0, connect internal computer 「introduction Localnetworkconnecteddevice 」 select eth1, the middle two tick Enable all, underneath you can select 「introduction KeepexistingDHCPconfiguration 」, he would use you just created, if you choose to enter 「introduction CreatnewDHCPconfiguration 」 good distribution coverage of IP, Firestarter will own set 「introduction/etc/dhcp3/dhcpd.conf 」. Forgot to remind everyone that you want to remember that the cable is connected properly, otherwise there is no logging to Firestarter two connected network card, it will not start NAT. Things here is not over yet, my computer still does not have access to the Internet, and so I put the original regional network established 192.168.1.3 into 「introduction automatically obtain IP address 」, below the select 「introduction automatically obtain DNS server address 」, everything is done. Watch with me for a long time of cFos display 「introduction interrupted line 」, got a strange sadness, don't, cFos, and from now on, I want to talk to my brother shared IP.

Apache logs: access log (2)

3. process statistics UNIX can track each user runs each command, if you want to know what last night mess of important documents, process statistics subsystem can tell you.

It also tracks a trespasser. And connection time log, process statistics subsystem default not activated, it must be started. On Linux systems start process statistics using the accton command, you must use root to run. Accton commands acctonfile, file must exist. Use the touch command to create the pacct file: touch/var/log/pacct and then run the accton: accton/var/log/pacct. Once the accton is activated, you can use the lastcomm command monitoring system commands at any time. To turn off statistics that can be used without any arguments accton command. Lastcomm command reports the file before execution. Without parameters, lastcomm command displays the current statistics file lifetime record of all information about the command. Including the command name, user, tty, command takes CPU time and a time stamp. If the system has many users, enter you can get quite long. The following example: crondFroot?? 0.00secsSunAug2000:16  promisc_check.sSroot?? 0.04secsSunAug2000:16  promisc_checkroot?? 0.01secsSunAug2000:16  greproot?? 0.02secsSunAug2000:16  tailroot?? 0.01secsSunAug2000:16  shroot?? 0.01secsSunAug2000:15  pingSroot?? 0.01secsSunAug2000:15  ping6.plFroot?? 0.01secsSunAug2000:15  shroot?? 0.01secsSunAug2000:15  pingSroot?? 0.02secsSunAug2000:15  ping6.plFroot?? 0.02secsSunAug2000:15  shroot?? 0.02secsSunAug2000:15  pingSroot?? 0.00secsSunAug2000:15  ping6.plFroot?? 0.01secsSunAug2000:15  shroot?? 0.01secsSunAug2000:15  pingSroot?? 0.01secsSunAug2000:15  shroot?? 0.02secsSunAug2000:15  pingSroot?? 1.34secsSunAug2000: acctonSrootttyp00.00secsSunAug2000 locaterootttyp01.34secsSunAug2000: 15 15: 15 process statistics are the pacct file may grow very fast. You need interactive or through cron mechanism keeps running sa command log data in the system control. Sa command report, cleaning and maintenance process statistics file. It can put the information in the compresses/var/log/pacct to summary file/var/log/savacct and/var/log/usracct. This summary contains the command name and user name of the classification system statistics. Sa default to read them, and then read the pacct file so that the report would contain all of the available information. Sa's output has the following tags: avio--each execution of the average number of I/O operations--user cp and total system time, in minutes, the cpu--and like k-cp-kernel used by average CPU time, in units of k * 1k sec--CPU storage integrity to 1k-core sec re--real time, in minutes, the s-system time, in minutes, tio--I/O operation of total u-user time, in minutes, for example: 842173.26re4.30cp0avio358k 210.98re4.06cp0avio299kind 924.80re0.05cp0avio291k *** oter 10530.44re0.03cp0avio302kping 10430.55re0.03cp0avio394ks 1620.11re0.03cp0avio413ksecurity.s * 1540.03re0.02cp0avio273kls 5631.61re0.02cp0avio823kping6.pl * 23.23re0.02cp0avio822kping6.pl 350.02re0.01cp0avio257kmd5sum 970.02re0.01cp0avio263kinitlog 120.19re0.01cp0avio399kpromisc_check.s 150.09re0.00cp0avio288kgrep 110.08re0.00cp0avio332kawK users can user instead of the command to provide a summary report. For example sa-m appears as follows: 885173.28re4.31cp0avk root879173.23re4.31cp0avk alias30.05re0.00cp0avk qmailp30.01re0.00cp0avk 4.Syslog device Syslog has been adopted by many log function, it is used in many protection measures--any program are available through syslog records events. Syslog to record system events, you can write to a file or device, or send a message to the user. It can record local events or through network record another host events. Syslog devices based on two important documents:/etc/syslogd (daemon) and the/etc/syslog.conf configuration file, it is customary that most information is written to the syslog/var/adm or/var/log directory information files (messages. *). A typical syslog records including generating program name and a text message. It also includes a range of equipment and a priority (but do not appear in the day). Each syslog message is assigned one of the following major equipment: LOG_AUTH--certification system: login, su, getty et LOG_AUTH LOG_AUTHPRIV--the same, but only to log on to choose single user-readable file LOG_CRON--cron daemon LOG_DAEMON--other system daemons, such as routed LOG_FTP--file transfer protocols: ftpd, ttpd LOG_KERN--kernel resulting message LOG_LPR--system printer buffer pool: lpr and lpd LOG_MAIL--e-mail system LOG_NEWS--network news system LOG_SYSLOG--by syslogd (8) the internal message LOG_USER--random user process message LOG_UUCP--UUCP subsystem LOG_LOCAL0 ~ LOG_LOCAL7--Syslog for local use reserved for each event gives several different priorities: LOG_EMERG LOG_ALERT--emergencies--should be immediately corrected issues, such as the system database corruption LOG_CRIT--important information, such as a hard disk error LOG_ERR LOG_WARNING-error--warning information LOG_NOTICE--is not an error, but may need to handle LOG_INFO LOG_DEBUG--information--contains intelligence information, usually to debug a program using the syslog.conf file specified in the record a log of syslogd, the program at startup query configuration file. This file consists of different program or message classification of individual entries, each on a separate line. For each type of information to offer a choice of domain and one domain. These fields are separated by tab: select the domain specified in the message type and priority; action field indicates syslogd receives a selection criteria that matches the message's action to be performed. Each option is composed by a device and priority. When specifying a priority, a syslogd records have the same or higher priority messages. So if you specify "crit", that all marked as crit, alert and emerg message will be recorded. Each row in the action field indicates when the select a field to select a given message after he ought to be sent. For example, if you want to record all messages to a file, as follows: # Logallthemailmessagesinoneplace mail. */var/log/maillog other devices also have their own logs. UUCP and news equipment can produce many external messages. It put the message into its own journal (/var/log/spooler) and the level limit for "err" or higher. For example: # Savemailandnewserrorsoflevelerrandhigherinaspecialfile. Uucp, news.crit/var/log/spooler when an emergency message arrives, you may want to let all users. Might also want to make your own log received and saved. # Everybodygetsemergencymessages, pluslogthemonanthermacine * .emerg ** .emerg  @ linuxaid.com.cn alert message should be written to the root and tiger's personal account number: # RootandTigergetalertandhighermessages * .alertroot, tiger sometimes syslogd will produce a lot of messages. Such as the kernel ("kern" devices) can be very lengthy. The user may want to put the kernel message records to/dev/console. The following example shows the kernel log records are commented out: # Logallkernelmessagestotheconsole # Loggingmuchelsecluttersupthescreen # kern. */dev/console users can specify all on one line. The following examples get info or a higher level of messages sent to/var/Log/messages, apart from the mail. Level "none" no one device: # Loganything (exceptmail) oflevelinfoorhiger # Don'tlogprivateauthenticationmessages! * .Info: mail.none; authpriv.none/var/log/messages in some cases, you can put the log sent to the printer, so network intruders do modify the log is not used. Often extensive records log. Syslog devices are a significant target for attackers. An other host maintenance log of the system for preventing server attacks particularly vulnerable, and therefore pay particular attention. There is a small command logger for syslog (3) the system log files provide a shell command interface that allows users to create entries in the log file. Usage: logger for example: loggerThisisatest! it produces a following syslog records: Aug1922: 22: 34tiger: Thisisatest! Note do not fully trust the log, because the attacker can easily modify it. 5. the program log number of programs by maintaining a log to reflect the system's security status. The su command allows the user to access another user's permissions, so its security is important, it's file for sulog. The same also sudolog. In addition, Apache has two logs: access_log and error_log.

Migration from Windows to Linux device control applications

Linux function ioctlLinux you can use the ioctl — intioctl (intfildes, intrequest,/* arg */...);

— To specify the device to send control information. The first parameter fildes is open () function returns the file descriptor for alleged specific devices. And the corresponding system call DeviceIOControl ioctl, the input parameters list is not fixed. It depends on what ioctl request, as well as the instructions request parameters, just as Windows function DeviceIOControl dwIoControlCode parameter. However, the migration period need to be aware of when choosing the correct request parameters, because the DeviceIOControl ioctl request of dwIoControlCode and have different values. But there is no dwIoControlCode and request explicit mapping list. Usually you can find the associated header file request parameter values defined for the selected parameter value. All control codes defined in/usr/include/{asm, linux}/* .h file. Parameter arg as specific equipment operation provides detailed command information. The data type of the arg depends on the specific control requests. This parameter can be used to send detailed commands and receive returned data. Migration example we see a from Windows to Linux migration example. This example involves from PC main IDE hard drive read SMART log. Step 1-identification device types as mentioned earlier, Linux devices are used as file. It is first necessary to describe the device's file on Linux. Only use this file to get the device control requires a handle to the device. In this example, the object is an IDE hard disk drive. Linux be described as/dev/hdb/dev/hda, etc. This example will be the migration of hard disk device pathname is \\\\.\\PhysicalDrive0. /Dev/hda is the device corresponding to the Linux name of the file. 2. the changes include the header file must # include header files for Linux (see table 3): table 3. # include header files WindowsLinux # include # include # include # include # include # include # include # include windows.h contains open and close the device functions (CreateFile and CloseHandle). Accordingly, on Linux is used to open () and close () function that contains the header file types.h, sys/sys/stat.h and fcntl. Windows devioctl.h for function DeviceIoControl, we change it to sys/ioctl.h to ensure that the function ioctl can work. Ntddscsi.h (it is a header file from the DDK) defines a set of control codes for device control. Because this case deals only with IDE hard drives, so simply linux/hdreg.h added to Linux program. For other situations, it should be sure to include all header files (with the required control code is defined). For example, if you access the CD-ROM rather than a hard disk drive that contains the linux/cdrom. 3. the correct function and parameter now we take a closer look at the code. Listing 4 shows the details of the order. Listing 4. command details unsignedcharcmdBuff [7]; cmdBuff [0] = SMART_READ_LOG;//UsedforspecifyingSMART "commands" cmdBuff [1] = 1;//IDEsectorcountregistercmdBuff [2] = 1;//IDEsectornumberregistercmdBuff [3] = SMART_CYL_LOW;//IDElowordercylindervaluecmdBuff [4] = SMART_CYL_HI;//IDEhighordercylindervaluecmdBuff [5] = 0xA0 | (((Dev-> Id-1) & 1) * 16);//IDEdrive/headregistercmdBuff [6] = SMART_CMD;//ActualIDEcommand command information from ATA command instruction. Because this code ported to Linux does not need to be modified, so there is no need for further analysis. Listing 5 shows the code to open the Windows primary hard drive. 5. open the Windows primary hard drive HANDLEdevHandle = CreateFile ("\\\\.\\PhysicalDrive0",//patnameGENERIC_WRITE | GENERIC_READ,//AccessModeFILE_SHARE_READ | FILE_SHARE_WRITE,//SharingModeNULL, OPEN_EXISTING, 0, NULL); from theThe device on and off by explaining, we need two parameters (file pathname, and device access mode) to open a Linux device. According to the front of the original code, the first argument should be the/dev/hda, second O_RDONLY | O_NONBLOCK. The modified code is as follows: HANDLEdevHandle = open ("/dev/hda", O_RDONLY | O_NONBLOCK);. Corresponding to CloseHandle (devHandle); changes to close (devHandle);. The main part of the transplantations is how to use ioctl to access specific devices and obtain the required information. The original Windows code as shown in Listing 6: inventory of the source code on the DeviceIoControl 6.Windows typedefstruct_Bufer {UCHARreq [8];//DetailedcommandinformationothertancontrolcodeULONGDataBufferSize;//SizeofDataBuffer, hereis512UCHARDataBuffer [512];//DataBufer} Bufer; BufferregBufer; memcpy (regBuffer.req, cmdBuff, 7);//req [7] isreservedforfutureuse.Mustbezero.regBuffer.DataBufferSize = 512; unsignedintsize = 512 + 12;//SizeofregBufer//8forreq, 4forDataBufferSize, 512fordataDWORDbytesRet = 0;//Numberofbytesreturnedintretval;//Returnedvalueretval = DeviceIoControl (devHandle, IOCTL_IDE_PASS_THROUGH,//ControlcoderegBuffer,//InputBuffer, includingdetailedcommandsize, regBuffer,//OutputBuffer, usethesamebuffereresize, & bytesRet, NULL); if (! retval) cout <"deviceiocontrolfailed."> The device handle in the two platforms is the first argument, it from CreateFile and Linux open () returns. But Windows control codes and Linux on the definition of requests vary greatly, so that there is no fixed rule to identify these two parameters are mapped, as indicated above. IOCTL_IDE_PASS_THROUGH is defined in the header file ntddscsi.h as CTL_CODE (IOCTL_SCSI_BASE, 0x040a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS). Passed in the header file to find the definition,/usr/include/linux/hdreg.h can choose the corresponding Linux control code HDIO_DRIVE_CMD. In addition, the device to complete specific tasks require detailed command information. The command stored in the cache, and returns the data of the memory space in the exchange of data in the process. We use the same caching to send commands and gets the required log information. Linux cache size can be changed; not necessarily out of eight bytes. This example uses the order of four bytes. The corresponding Linux code (listing 7) looks simple, because its structure and function parameters than Windows is simple. List of source code 7.Linux function ioctl intretval; unsignedcharreq [4 + 512];//Enoughforreturneddataandthe4bytedetailedcommandinformationreq [0] = cmdBuff [6];//Considertherequirementinthissample, only4bytesareusedreq [1] = cmdBuff [2]; req [2] = cmdBuff [0]; req [3] = cmdBuff [1]; retval = ioctl (devHandle, HDIO_DRIVE_CMD, & req); if (ret) cout <"ioctlfailed."> The task now is to compile a Linux platform for the program and correct the remaining syntax errors. According to the Linux version and the build environment, you may need another modification.

In the following configuration SVN server Fedora10

1. install subversion: yum install subversion.i386 (note; in mandriva here you need to install subversion subversion-server subversion-tool urpmi) subversion version 2, create, and modify permissions to the library # mkdir-p # SVNPATH/repos # svnadmin create # SVNPATH/repos/project13, start the subversion service, and sets the version of the library location # svnserve--daemon--root = # SVNPATH/repos--listen-port = 3690 Note: not recommended to use a root user start the service, the default port number is 36904. # yum list mod_dav_svn Note: you can find the packages associated with mod_dav_svn mod_dav_svn.i386, install yum install mod_dav_svn.i386 mod_dav_svn.i386 # Note: after installation can be found in/etc/httpd/conf.d folder, automatically generate a subversion.conf file and automatically adds the following two lines: LoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so to ... ...

Between the content read as follows: DAV svnSVNPath # SVNPATH/repos/project15, restart the Apache service # apachectl restart6, modify SELINUX permission # chcon-R-h-u system_u-t httpd_sys_content_t # SVNPATH/repos7. can use # lsof-i:3690 see if open 8. modify profile/home/svnroot/repository/conf/svnserve.conf [general] # anonymous access permissions can be read, write, none, default = none # readanon-access = authenticated user permissions, can be read, write, none, default is writeauth-access = write # password database path, remove the preceding # password-db = passwd # user permissions # authz-db = passwd authz modify profile [users] user = passwoduser1 = password1 modify configuration file authz [test1:/] user = rw [test1:/doc] user1 = rw9. for a single code warehouse start command svnserve-d-r/home/svnroot/repository/test1--listen-host 192.168.1.18 which-d runs in the background,-r specifies the server's root directory, so you can access the server directly accesses the svn://server ip. If the server has multiple ip words--listen-host to specify the IP address to listen on. We can be in svn client through the svn://192.168.1.18 to access svn server. For more code warehouse, we at startup or you can use the-r option to specify the server root directory, but you need write access on each warehouse relative to svn root. For example, we have two code warehouse/home/svnroot/repository/test1 and/home/svnroot/repository/test2, we use svnserve-d-r listen-host 192.168.1.18/home/svnroot/repository--to start, then in client access you can use svn://192.168.1.18/test1 and svn://192.168.1.200/test2 to access two project start to finish, we can use ps aux | grep svnserv to see if svnserve process exists. 10. open Server default port is the port SVN 3690, you need to open this port on the firewall. /Sbin/iptables-A INPUT-I eth0-p tcp--dport 3690-j ACCEPT/sbin/service iptables save you can also use svnserve--listen-port option to specify a different port already open, but in this case the client must also be coupled with the port, such as svn://192.168.1.18: 9999/. 11.yum has a interesting usage: yum whatprovides mod_dav_svn.so12. in mandriva to install mod_dav.so, you can use urpmi apache-mod_dav_svn

Linux system and server antivirus real

VI. application examples such as the need to check local system loaded Windows partition, if you want to check the C disk: use the command: # avastcmd/mnt/winc-report = cj above this command also generates a report file name is cjh.

If you cannot confirm that your e-mail server support 8-bit bytes, you can directly send a report with the command to an administrator <附件文件名>| e-mail: <邮件地址>mail cat cat (abbreviation for "concatenate") command is handled several files into one file and save the results of processing to a single output file, here we use it to merge the text of the message.   Catcjh | mailgoodcj above command indicates that the content of the file contents for cjh message to user goodcj. Killing the heterogeneous network of computers in the Windows platform: in addition we usually use Samba to make the file share, Samba can and use the Windows operating system of the machine very good collaboration, on a Windows machine, Samba service is displayed in the network neighborhood of a server, we can put the Windows file saved on the server. You can take a share of other Windows machines on the Samba directory, and then together kill, even Windows machine for viruses also killed. Mapping a network drive, we know, in Windows you can set the shared directory mapped as network drives, so you can take a share as a local folder. In Linux there are similar in functionality, you can achieve with smbmount command: first/mnt directory create a directory, say $/mnt/smb/A1, # mkdir – pmnt/smb/A1 to remote computer: a1 shared disk mounted to/mnt/smb/A1 d, and just like the local file system like killing the computer virus: # smbmount//A1/d/mnt/smb/A1 # cd/mnt/smb/A1 # avastcmd 2, uninstall the map directory, you can use the umount command, and then mount the other computer virus checking is the same as the method will not repeat them here. VII. scheduled start avastcmd method avastdwatch.sh is a software that establishes the steps of the file, it can be scheduled using the cron and avastcmd on Linux, the task can be configured within a specified time period, the specified date, or system average load below specified number automatically. 1. use the cron command scheduled start avastcmd cron is a can be used depending on the time, date, month, week, to scheduling to duplicate tasks performed by the daemon. Cron assumes that the system continues to run. The primary configuration file for the cron is/etc/crontab,/etc/crontab each line in the file represents a task, its format is: minutehourdaymonthdayofweekcommand · minute — minute, from 0 to 59 on any integer hour-hour ·., ranging from 0 to any integer between 23. date from day · — from 1 to 31 of any integer number (must be the effective date of the month). · month-the month, from 1 to 12 of any integer between (or use the English abbreviation of the month such as jan). · dayofweek-week from 0 to 7 any integer (or use the English abbreviation such as week sun, etc.). · command-command to execute. Application example: first establish a timer settings file, the file name mytype (name your own setting): # crontab-e file content: */* 5 * * * avastdwatch.sh-a =/var/run/avast4/local.sock-t = 15-d =/tmp-l =/var/log/avast4/avastdwatch.log so that users in each of the five minutes automatically catalog/tmp scanned for viruses and produces a report file log file avastdwatch.log. Here we describe the command-line-based Linux Server antivirus software, you may find the command line mode is not very friendly, behind the author will introduce and avast! forLinux/UnixServers similar with GUI interface anti-virus tools: avast! LinuxHomeEdition.

Linux security strategy

This article is intended to let the reader on linux security configurations have a general understanding of, Oh, because I have also read some articles about this, saying that space, HA HA, in fact, I think the linux machine to do general security configuration, the minute they get, Hei Hei 1, installation, we are all familiar with, Oh, first, isolate network system, of course, choose custom installation, install the packages you need.

Hard drive partitions: If you use root partition record data such as log files and email, it may cause a denial of service produced a large number of logs or spam. Cause a system crash. It is recommended for the/var partition separately opened, used for storing logs and messages to avoid root partition is overrun, the miserable. The best for the particular application to open a separate partition, especially can produce excessive log program, there are proposals for a separate sub/home, so they can't fill the/partition, the following are my partitions on a hard drive:/root/var log/hacking hee hee, some black soft swap do not more/ome when the system restarts after finished installing, it is best to call the corresponding system of security patches, please develop good habits, remember, you're not at home with 98, pretend is a linux server, huh, huh. For redhat system, can be found at: http://www.redhat.com/corp/support/errata/patch. In later versions with redhat6.1 a tool up2date, it can measure which RPM packages you need to upgrade, and then automatically from redhat's site to download and complete the installation. 2, close the services hehe, good with words, you want your system absolutely safe, choke cable, Oh, of course, our machines to external services, it is not realistic, so shutting down unnecessary services is necessary because some services are for your system. The default linux is a powerful system, running a lot of services. However, there are many services are not needed and easily pose a security risk. The first file is the/etc/inetd.conf, it has developed a service that will be listening/usr/sbin/inetd, you may only need two: telnet and FTP, and other many as popd, imapd and rsh is likely to cause security problems. Use the following command displays have been commented out of service: suneagle # grep-v "#"/etc/inetd.con nowait root ftp streamtcp/usr/sbin/tcpd in.ftpd-l-a telnet stream tcp nowaitroot/usr/sbin/tcpd in.telnetd shell stream tcp nowait root/usr/sbin/tcpdin.rsd stream tcp nowait root login/usr/sbin/tcpdin.rlogind talk dgram udp wait nobody.tty/usr/sbin/tcpdin.talkd ntalk dgram udp wait nobody.tty/usr/sbin/tcpd in.ntalkd pop-3 stream tcp nowait root/usr/sbin/tcpd ipop3d imap stream tcp nowait root/usr/sbin/tcpd imapd finger stream tcp nowaitnobody/usr/sbin/tcpd in.fingerd linuxconfstreamtcpwaitroot/bin/linuxconflinuxconf--ttp stream tcp nowait root exec/bin/shs-I LOL look last row, not just tied up rootshell? Oh, what consequences? Oh look, one of the remote win2000 machine with the following command: E:\cmd > nc192.0.0.88512 bas # id id uid = 0 (root) gid = 0 (root) groups = 0 (root) bas # know? 嘿嘿, attention Oh * ^ _ ^ * I have written a article about using this file tied backdoor article, huh, huh, offensive, this command can help you find out there is no back door, huh, huh. Next is to start, they determine the .rc script init process which services you want to start. Redhat system, these scripts in/etc/rc.d/rc3.d (if your system to x as the default boot, then, is/etc/rc.d/rc5.d). To start a service when the prohibition, only need to replace the uppercase to lowercase S s, meanwhile, redhat also provides a tool to help you shut down the service, enter/usr/sbin/setup and choose systemservices ", you can customize which run at system startup. Another option is the chkconfig command, many linuX version of the system comes with the tool. The script name in the order of digital is starting to uppercase K at the beginning of the process is killed. The following are some of the major services: S05apmd notebook needs S10xntpd network time protocol S11portmap running rpc service required S15sound sound card related S15netfs nfs client S20rstatd avoid running service, remote users can get a lot of information S20rusersd S20rwod S20rwalld S20bootparamd diskless workstation S25squid Agent service S34yppasswdd NIS servers, this service vulnerability many S35ypserv NIS servers, this service vulnerability many S35dhcpd dhcp service S40atd and cron is very similar to running a program of scheduled services S45pcmcia PCMCIA card, notebook S50snmpd SNMP, remote users can access a number of system information S55named DNS service S55routed RIP, there is no need to keep running it S60lpd print service S60mars-nwe NetWare file and print services S60nfs NFS server, the vulnerabilities that many S72amd automount, mount the remote use of S75gated another routing services, such as the OSP S80sendmail mail services, such as closing, you can still send letters, just not the recipient and the Web server for relay S85httpd S87ypbind NIS client S90xfs Xfont Server S95innd News server Slinuxconf this are all familiar with it, huh, huh, through browser remote management systems use this command to view before you close the startup script of the number of services running: suneagle # ps-eaf | wc-l 54 my system has 54 service is running, when you close some service after running the above command again and see how much less. The fewer the services running, the more secure the system. Use the following command to see what services are running: suneagle # netstat-na--ip ActiveInternetconnections (serversandestablised) ProtoRecv-QSend-QLocalAddress ForeignAddress State tcp 0 136192.0.0.88: 23 192.0.0.5: 1236 ESTABLISED tcp 0 0192.0.0.88: 23 192.0.0.8: 1113 ESTABLISED tcp 0 0192.0.0.88: 139 192.0.0.8: 1112 ESTABLISED tcp 0 0192.0.0.88: 1024 61.153.17.24: 23 ESTABLISED tcp 0 0192.0.0.88: 23 192.0.0.8: 1084 ESTABLISED tcp 0 00.0.0.0: 139 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 80 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 25 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 515 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 512 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 98 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 79 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 143 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 110 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 513 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 514 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 23 0.0.0.0: * LISTEN tcp 0 00.0.0.0: 21 0.0.0.0: * LISTEN tcp 0 0 00.0.0.0: 113.0.0.0: * LISTEN tcp 0 00.0.0.0: 111 0.0.0.0: * LISTEN udp 1024 0 0127.0.0.1: 0.0.0.0: * udp 0 0192.0.0.88: 138 0.0.0.0: * udp 0 0192.0.0.88: 137 0.0.0.0: * udp 0 00.0.0.0: 138 0.0.0.0: * udp 0 00.0.0.0: 137 0.0.0.0: * udp 0 00.0.0.0: 518 0.0.0.0: * udp 0 00.0.0.0: 517 0.0.0.0: * udp 0 00.0.0.0: 111 0.0.0.0: * raw 0 00.0.0.0: 1 0.0.0.0: * 7 raw 0 00.0.0.0: 6 0.0.0.0: * 7 Oh, my system because the test, so deliberately opened many dangerous port, Oh, we don't learn me Oh, the gateway to gateway, HA HA. 3, the log records and enhanced close some unnecessary services, the log is also a need we care, configured unix system log very powerful, and even can make traps on the blog, I can write long-winded, here is a detail log of principle, interested friends can refer to the relevant information or read my other article on the principle of solaris system log. ! All logs are/var/log (only on linux systems), the default Linux log is a powerful addition to ftp. But we can modify/etc/inetd.conf/etc/ftpaccess or, to ensure each FTP connection logs are recorded. The following is an example of a modify inetd.conf: ftp stream tcp nowait root/usr/sbin/tcpd in.ftpd-l-L-i-o-l each ftp connections are written to the syslog-L record the user's every command-I file received, record the xferlog-o file transmitted, to the xferlog