Resource Sharing between Windows and Linux

Source: Internet
Author: User

Resource Sharing between Windows and Linux

 

1. Share linux resources from Windows

 

Little Red Hat redhat6.0 comes with the compiled samba program to provide the samba file sharing service. First, set the configuration file/etc/smb. conf. Settings: Working Group or domain name of the Local Machine, netbios machine name, local or NT domain controller password authentication method; local authentication, use the command/usr/bin/smbpasswd to generate the user password file/etc/smbpasswd. Set the shared directory, for example, the actual directory/disk1/film corresponding to the film shared directory.

 

[Global]

# Workgroup = NT-Domain-Name or Workgroup-Name

Workgroup = cauic

# Netbios name = machine name

Netbios name = linuxzrm

# Server string is the equivalent

The NT Description field

Server string = Linuxzou Samba Server

# Security = user authentication method:

Local authentication (user) or Domain Controller Authentication (server)

Security = user

; Security = server

# Use this password file for local authentication

Smb passwd file =/etc/smbpasswd

Encrypt passwords = yes

Guest account = nobody

Allow hosts = 202.111_2.

Deny hosts = all

[Film]

Available = yes

Path =/disk1/film

 

 

 

---- After modifying the configuration, use testparm to test whether the configuration is normal. Then run/etc/rc. d/init. d/smb start | restart to start or restart the smaba Service (including the smbd and nmbd services ).

 

---- Now, you can browse the shared resource named linuxzrm under the cauic Working Group in windows.

 

2. Share windows resources from linux

 

---- Use the linux tool smbmount to load the shared directory in windows to the local directory by using the smb file system. The following shell program (which must be executed by a Super User) indicates to share the rmcontent directory under the windows Server ***** with the username zoup and password z12345, load it to the local/vodcontent directory. The installation point belongs to the local user zou User Group staff.

 

#/Home/zou/mountvod. sh

Smbmount "// vod/rmcontent"-C' mount/vodcontent

-U zou-g staff '-U zoup % z12345

 

 

 

Place the preceding commands in the system startup file. The windows shared directory is automatically loaded every time the system starts. For example, add the following statement to the/etc/rc. d/rc. local file:

 

If [-f/home/zou/mountvod. sh]; then

Echo mounting // vod/rmconten

/Home/zou/mountvod. sh>/home/zou/mountvod. log

Fi

Related Article

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.