Three methods to achieve random startup of SAMBA services

Source: Internet
Author: User
Article Title: three methods to achieve random startup of SAMBA services. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Using SAMBA server software, non-Linux clients such as Windows can smoothly access Shared resources on Linux servers. If many shared resources are configured on the Linux Server (for example, the Linux Server is a file server), it is best to enable the SAMBA service from time to allow the Windows client to smoothly access these shared resources, it is not enabled when necessary. To achieve this goal, the best practice is to automatically start the SAMBA server when the Linux system is started, to save time for manual start. In addition, this can also avoid access failures for other clients due to the server disabling the service due to forgetting to start the service.

In Linux, there are many implementation methods to enable the SAMBA server to start at random. The system administrator can select an appropriate implementation method based on his/her interests and professional background.

Method 1: Use ntsysv for configuration.

In Windows, there is a MSCONFIG tool. You can use this tool to set some services. For example, set some services to start randomly, so that some services do not start randomly. In fact, a similar tool, ntsysv, is also available in Linux. You can use the man command to view the description of this tool. As shown in:



To put it simply, ntsysv is a SysV-style runlevel configuration tool that uses the newt library. It is a program developed by Red Hat following GPL rules. It has an interactive operation interface similar to Msconfig. Through this interface, the system administrator can easily use the direction keys and space keys to enable and disable various services of the operating system at each execution level and set the system. However, it seems that the mouse operation is not supported until now, and you need to use the keyboard to implement relevant settings. The ntsysv tool provides a simple interface for activating or stopping services. The system administrator can use ntsysv to start or disable services managed by xinetd, and use ntsysv to configure the running level. By default, only the current running level is configured. To configure different running levels, you must use the -- level option to specify one or more running levels. The interactive interface provided by the Ntsysv Configuration tool works in a similar way as the installer in text mode. The system administrator can use the up and down arrows to view the list, and use the space bar key to select or cancel the selection of related services. In addition, the system administrator can click (enter key) click OK or cancel to select or cancel a service. To switch between services in the confirm or cancel buttons, you can use the Tab key. If a service name has a * symbol before it, it indicates that the service is set to start. When the system administrator needs to know more about the service, press the F1 help key to display a brief description of each service.

It can be seen that ntsysv provides a graphical Configuration tool, which is the first choice for Linux system administrators to set up random startup of SMB services. If the system administrator needs to use this tool for configuration, the operation is also very simple. First, the system administrator needs to enter the "ntsysv" command on the Linux terminal. Then the system starts the Configuration window. Second, the system administrator needs to use the upper and lower keys on the keyboard to find the SMB entry in the list. Click the Space key to enable the Service. Note that after pressing the Space key, the system administrator must ensure that there is a * number before the service. This symbol indicates that the service is set to start at random. Finally, use the Tab key to move the cursor to the OK button and press the Enter key to confirm. Although the Ntsysv tool does not provide keyboard support, this may be commonplace for most Linux system administrators and will not cause much trouble to them. However, some Linux versions may not support this tool. In this case, the system administrator may need to configure the tool in the following ways.

[1] [2] [3] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.