Resource Sharing between Windows and Linux

  



Both Windows and Linux are commonly used operating systems. How to share resources between the two is a lot of interesting issues. The following will introduce the methods of resource sharing in the two systems.

Sharing Linux resources under Windows system
Using the samba program that comes with Red Hat Redhat 6.0 can share shared files in Linux under Windows. The samba program provides samba file sharing service. To use this file sharing service, first set the configuration file /etc/smb.conf, set the working group or domain name of the machine, netbios machine name, local or NT domain controller password authentication method. When making local authentication settings, use the command /usr/bin/smbpasswd to generate the user password file /etc/smbpasswd, and then set the directory in Linux that allows Windows to share, such as shared file, the actual directory corresponding to the directory is /disk1/File. The specific settings are as follows:


[global]
The working group or domain name of the machine, netbios machine name
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = host
# netbios name = machine name
netbios name = linuxpc
# server string is the equivalent of 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
# Local authentication, use this password file
smb passwd file = /etc/smbpasswd
encrypt passwords = yes
guest account = nobody
allow hosts = 192.168.0.1
deny hosts = all
[file]
available = yes
Path = /disk1/file

After setting the configuration, you can use the tool testparm provided in redhat 6.0 to test whether the configuration is normal. If the test is normal, execute /etc/rc.d/init.d/smb start| Restart Start or restart the smaba service (including smbd and nmbd services), and then you can browse the shared resources of the host linuxpc under the host workgroup under windows.

Sharing Windows resources under Linux
To share resources under Windows under Linux, use the tool smbmount provided in Linux. This program will load the shared directory under Windows according to the smb file system to Linux. Under the machine's directory. For example:

smbmount "//proxy/wy" -c "mount /everyone -u host -g abc"
-U local%digital

This example indicates that the superuser is the user The name is local, the password is digital, and the shared directory wy under the windows server proxy is loaded into the Linux /everyone directory. The installation point is the abc in the host user group of the local user.
Put the above setting command into the system startup file, the windows shared directory will be automatically loaded after each system startup, so that the directories and files in Windows can be shared under Linux.

Copyright © Windows knowledge All Rights Reserved