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