LINUX Study Notes-SAMBA usage-Linux Enterprise Application-Linux server application information. For more information, see the following section. Install and learn REDHAT LINUX7.0 half a month ago. As a newbie to Linux, I encountered some inevitable problems. By reading books and materials, viewing BBS, I tried to solve some problems. Think of your own experience and lessons for others to learn from, so you can write it out, and save it as study notes, and hope to help your friends who have just started Linux. Due to my limited ability, it is inevitable that I have some omissions in my notes. please correct me.
I. SAMBA Introduction
NetBIOS is an API designed to facilitate the development of LAN-based resource sharing applications. Then, NetBEUI and NBT (NetBIOS OVER TCP/IP) protocols are generated based on NetBIOS. The NBT Protocol is further developed into SMB and CIFS protocols. By default, the NetBEUI protocol is used for Windows Lan, while the SAMBA Software Package uses the CIFS protocol. As a result, the machine with the SAMBA software package can communicate with the machine on Windows network, allow UNIX and LINUX machines without the NetBEUI protocol to share resources with Windows networks with SAMBA.
2. Installation of SAMBA
SAMBA has been installed in the default installation mode of RedHat Linux7.0. Run the "rpm-q samba" command to check whether the system has installed SAMBA and the version. If not, you can find the SAMBA rpm file from the installation disc for manual installation.
Iii. Start SAMBA
Run "ps-aux | grep smb" to check whether the SAMBA service is running. Run the "/etc/init. d/smb start" command to start SAMBA, or set SAMBA to start when the system starts. In specific steps, Run "linuxconf", click "control service activity", display the screen, click "smb" in the "sevice control" list, and set "start as" automatic ", "run level" is "5 ".
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs0402linuxconf.gif'); ">
4. Access a Windows Client
After smb is started, you can access the machine running Windows without any settings. There are now two machines running Linux and Windows 98, with the host names redhat and lily respectively. Lily has the directory "download", the printer "HP", the directory is set to "Full Access", and the password is "abc ".
1. Access the shared directory on lily.
Step 1: view the shared resources of lily, "smbclient-L/lily". When prompted, enter the password to list the available resources on lily.
Step 2: "mkdir/mnt/download" and create a directory under "/mnt.
Step 3: "mount-t smbfs-o username = abc, password = abc // lily/download/mnt/download ", link the shared directory on lily to/mnt/download in redhat. Next, you can access the shared directory as if you were using a local hard disk. You can also edit "/etc/rc. d/rc. local, and add "mount-t smbfs-o username = abc, password = abc/lily/download/mnt/download" to the last line of the file, when the system starts, the shared directory is mounted.
2. Use the printer on lily.
Click the Gnome icon on the taskbar, click system, and click control panel ". In the control panel Window, click the Printer icon and select SMB/Window 95/98/NT Printer ",.
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs0402entry.gif'); ">
The settings window appears ,.
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs0402printer.gif'); ">
"Hostname of Printer Server" should be filled with the host name. Here is "lily"; "Printer name" is the name of the Printer displayed by "smbclient-L // lily, here is "HP"; "input filter" allows you to select the printer model,
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs0402inputfilter.gif'); ">
You can use a similar model. For example, if the printer on lily is HP deskjet1120c, choose 550c/560c/6xxc. These three items must be set. Then you can test the printer.
5. Allow Windows machines to access Linux
Two methods:
1. manually edit the "/etc/smb. conf" file;
2. Use the graphic interface to set smb. conf. The latter is described here.
Edit "/etc/xinetd. d/swat", change "disable = yes" to "disable = no", and "only_from = localhost" to "only_from = 10.0.0.39 ". Note: this IP address is the NIC address of my machine. If you do not change it, you cannot log on to the SWAT management interface with "localhost: 901. Will prompt you: "A network ettor occured while Netsape was refreshing data.
(Network Error: Broken Pipe) Try Connecting again ."
Enter "10.0.0.39: 901" in the browser to enter SWAT,
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs0402swat.gif'); ">
Step 1: Set "global". If the "security" type is changed to "share", "workgroup" is the group name that appears in the network neighbor, "netbios name" is the name of the local machine in the group. If it is not set, the host name is used ..
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs0402global.gif'); ">
Step 2: Set "shares ",
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs040242401.gif'); ">
Create a new share name, and click the share name next to "choose share. Set "path" to "/home/download", "guest OK" to "yes", and "writable" to "yes ", finally, do not forget to click "commit changes" to accept the new settings ,.
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.ddvip.net/ OS /linux/index2/img_linux/cjs040242402.gif'); ">
Open the network neighbor on lily and you will see a "mygroup" group with a "redhat" computer in it. The shared directory is "download ".
So far, a simple two-way sharing is established. Of course, SAMBA features are far from this point, and more complex features. If you are interested, please refer to various materials.
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