Configure Samba exercise in Hongqi 7

Source: Internet
Author: User
Configure Samba in Hongqi 7-Linux general technology-Linux technology and application information. For more information, see the following. [I = s] This post was last edited by johnysqlinux at, January 9 ,.

By default, the Samba service is installed in Hongqi 7. You only need to configure the file/etc/samba/smb. conf.
1. Set the shared directory
A. Share-level sharing settings
# Mkdir/samba
# Chmod 777/samba
Use Kwrite to open smb. conf. Add the following content to the file, which can be added at the beginning.
[Samba] # samba is a shared file name that can be filled in as needed
Path =/samba # (specify the location of the file to be shared) if security = share is to be written as path = samba, note that no/
Writable = yes
Browsbale = yes
Public = yes
Guest OK = yes

# Service smb restart // restart the samba server
Use the ifconfig command to view IP addresses
Enter \ ip in the address bar of a Windows machine to access the shared directory.
B. user-level sharing settings
# Useradd test // Add a test user
# Passwd test // set the password of the test user
# Smbpasswd? A test // Add the test user as a samba user
Chown test/samba // make the test user the owner of the/samba directory

# Vi/etc/samba/smb. conf
// Find security = share and change it to security = user
# Service smb restart // restart the samba server
Enter \ ip. The user verification dialog box is displayed.

2. Access Windows shared folders in Linux
A. Run the following command to mount the Windows shared directory to a folder in Linux:
Mount. cifs // 192.168.1.10/mydocument/mnt-o user = user name, password = password // 192.168.1.10 is the Windows system IP address, and the user name is the Windows system user. Note that there is no space in the password.

Mount. cifs // 192.168.1.10/mydocument/mnt-o user = administrator, password = 123 // 192.168.1.10 is the Windows system IP address, and adinistrator is a Windows system user

Mount. cifs // 192.168.1.10/mydocument/mnt-o user = Windows Domain Name \ administrator // 192.168.1.10 is the Windows system IP address, and username is the Windows system user

B. unmount
Umount/mnt

C. net use and mount. cifs in windows have similar functions
Net use z: \ 192.168.1.10 \ mydocument password/user: user Name
Net use z: \ 192.168.1.10 \ mydocument 123/user: administrator // map the mydocument shared directory of \ 192.168.1.10 to Z: disk. 123 is the password.
Net use z:/delete // delete the Z Disk




References
Http://www.linuxidc.com/Linux/2007-10/8418p3.htm
Http://www.linuxeden.com/html/netadmin/20080513/57304.html
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.