Simple Windows and Linux file sharing

xiaoxiao2021-03-06  90

Simple implementation of Windows and Linux file sharing just a note, it is more convenient to review it later. Use Samba 3.0 to share hard drives with two different operating systems, when I mainly use it to back up my Blog and BBS. Installation Samba, this is very simple, if you are fedora, you can install Samba's RPM package directly from the CD. RPM-IVH Samba-3.0.0-15.i386.rpm You can also go directly to Samba's official website (http://www.samba.org) to download the latest package the latest version of Samba 3.0.4, FTP can be downloaded. Then it is best to compile TAR ZVXF Samba-3.0.4.tar.gz CD Samba-3.0.4.Tar.gz CD Samba-3.0.4 ./configure / --prefix = / usr / --bindir = / usr / usr / --bindir = / us BIN / --SBINDIR = / usr / sbin / --libexecdir = / usr / limited / var / --libdir = / usr / lib / --with-lockdir = / var / limited = / usr / share / samba / swat / --with-codepagedir = / etc / samba / CODEPAGES / --WITH-ConfigDir = / etc / samba / --with-SMBWRAPPER / --WITH-Automount / --With-SMBMount / --With-Pam / --with-Pam_smbpass / --With-Winbind Make Make Intall OK! After installation, the following is our focus, modify /etc/samba/smb.conf, everyone is best to modify on the basis.

[Global] Workgroup = MyGroup workgroup name, equivalent to the domain. Server string = LZSJ host name, just write log file = /var/log/samba/%M.log log storage directory security = user uses User, Each user has an account on the Samba server. If you plan to let everyone use the same shared resource, you can set it to security = share encrypt passwords = yes smb passwd file = / etc / samba / smbpasswd uses Samba authentication password, add one The user command is as follows: SMBPasswd -a: Add a user, and set a password. SMBPasswd -d: Disable a Samba user. SMBPasswd -e: Enable a Samba user. [SJWeb] shared directory name Comment = SJHome Web shared directory PATH = / OPT / WWW / Blog Shared Directory under Linux Valid Users = SJWEB User Name PUBLIC = No allows all users who can log in to see this directory Writable = no can write Printable = no create mask = 0765 settings Shared directory privileges then add SJWEB username under the system. GroupAdd Sjweb Added SJWEB Group UserAdd -g Shweb Added SJWEB Username Increases Use Out of Use Video / etc / Passwd and / etc / Group These two files In, whether there is SJWEB this username and group. Use the command: chown -r sjweb: sjweb / opt / www / blog -r indicates that the SJWEB username and group are given the / opt / www / blog directory. Then use the command: chmod 755 / OPT / WWW / Blog gives shared directory readable and executable permissions. Restart Samba: /etc/rc.d/init.d/sam restart OK, then set your own Samba normal, use commands: SMBCLIENT -L Machine IP Address Password: Anonymous Login Successful Domain = [MyGroup] OS = [UNIX] Server = [Samba 3.0.4] ShareName Type Comment ------------ ------- Share Disk Pvpgn's Share IPB Disk Pvpgn's Share SJWEB Disk Sjhome Web IPC $ IPC IPC Service (LZTV) Admin $ IPC IPC Service (LZTV) Anonymous login successful domain = [mygroup] OS = [UNIX] Server = [Samba 3.0.4] Server Comment --------------- LZSJ LZSJ WORKGROUP MASTER ------- ------- MyGroup lzsj After password, you can get the above information. If you don't have the above message, see if it is a firewall that is not allowed to allow 137 or 139 port access, add the following rules. Option: iptables -a input -p UDP -S Native IP Address - Dport 137 -J Accept iptables -a INPUT -P UDP -S Native IP Address - Dport 139 -j Accept. Then still use: SMBClient -L IP address of the other party Windows system. I am using Windows2000 as an example. [Root @ STLNX4 Samba] # SMBClient -l Allo IP Address Password: Anonymous Login Successful Domain =

转载请注明原文地址:https://www.9cbs.com/read-104642.html

New Post(0)