In Windows, you can map a shared directory to a disk file system by ing network drives. in Linux, you can use the smbmount command to implement similar functions, mount a shared directory in Windows to a directory in Linux.
Test Platform:
Red Hat Enterprise Linux AS release 3 (Taroon)
Windows 2000 Advanced Server SP4
Current Test conditions:
1. Windows and Linux are in the same LAN, and can be pinged to each other without a firewall
2. Windows IP Address: 192.168.60.188
3. Linux IP Address: 192.168.60.189
4. The following shares are currently available on Windows: c $, tempeveryone has read permission)
5. Windows users have cmw Administrator group user accounts), grp Administrator group user accounts), guest is not enabled currently), no root account
6. Install the relevant RPM package on Linux: samba-client, which is a Samba client tool. After installation, run the smbmount command.
The basic test process is as follows:
Syntax: smbmount // ip address/shared name mount point-o option 1, option 2 ......
1. Mount c $ share:
[Root @ rh root] # smbmount // 192.168.60.188/c $./c $-o username = cmw
Password:
[Root @ rh root] # cd c $
Or:
[Root @ rh root] # smbmount // 192.168.60.188/c $./c $-o username = cmw, password = cmww
Lovegrp
[Root @ rh root] # cd c $
2. Mount temp sharing to enable the guest account)
[Root @ rh root] # smbmount // 192.168.60.188/temp./temp
Password:
[Root @ rh root] # cd temp/
[Root @ rh temp] # ls
Samba webmin-1.260.tar.gz.
If no account or password is specified, use the environment variable "USER" as the account and the environment variable PASSWD as the password. Because Windows has enabled the guest account, and temp sharing allows anyone to read the password, so this command runs successfully.
[Root @ rh root] # umount./temp
Detach a Network File System
3. Mount the temp share. The guest account is not enabled)
[Root @ rh root] # smbmount // 192.168.60.188/temp./temp
Password:
Anonymous login successful
2068: tree connect failed: ERRDOS-ERRnoaccess (Access denied .)
SMB connection failed
The connection failed because the guest account is disabled.
Related Articles]
- Tricks learning file sharing access self-built Network Expert
- Use samba to share WIN2000 and Linux Files