For details about how to install and use samba in linux-Linux general technology-Linux technology and application information, see the following. I have not learned linux for a long time. It takes a lot of time to install some things. Now I will write down my experience in installing samba and give it to others!
1. My environment is RedHat9.0 installed on the virtual machine.
2. Install samba to enable sharing between windows and linux
2.1. Check the IP address and network connection of the local machine.
Ifconfig (if eth0 is not displayed, it indicates that the NIC in linux has not started)
The specific configuration is as follows:
Enter netconfig and select yes. After entering, you can select dhcp or manually configure the IP address, subnet mask, and wangka.
If dhcp is selected, in the/etc/sysconfig/network-script/directory, vi ifcfg-eth0, add
Check_link_down ()
{Return 1 ;}
If you do not configure it manually.
Restart the network service network restart.
If you input ifconfig again, eth0 is displayed.
3. samba Installation Process
3.1 first download a samba. iso file
3.2 click the VM menu VM -- Removable Devices -- CD/DVD -- Settings, and select use ISO image file: mount the samba. iso file
3.2 rpm-qa | grep samba check whether samba has been installed. If any information appears, you do not need to perform the following steps.
3.3 mount/dev/cdrom/mnt/cdrom
3.4 enter/mnt/cdrom, enter ls to view the file name, and then enter the rpm-ivh samba-3.0.20b-1.i386.rpm to start automatic installation.
3.5 uninstall the optical drive umount/mnt/cdrom after installation
3.6 enter rpm-qa | grep samba to check whether the installation is successful.
4. Use linux to access windows (view the windows shared directory)
4.1 enter the host name to be accessed by smbclient-L-User Name of the host to be accessed by U
4.2 prompt Password, enter the Password of the machine to be accessed
5. Use linux to access windows (use the content in the windows shared directory)
5.1 enter mount-t smbfs-o username = administrator, password = password for windows/host name for windows/shared directory to be accessed
Name/mnt/cdrom
5.2 cd/mnt/cdrom
5.3 ls will display the contents in the shared directory.
6. Use windows to access linux
6.1 enter cd/etc/samba
6.2 edit the smb. conf file and back up the cp smb. conf smb. conf_bak. Because the content in smb. conf is too cumbersome, I will delete it rm-fr smb. conf first.
6.3 vi smb. conf
[Global]
Workgroup = test
Netbios name = sambasvr
Guest only = yes
Guest account = root
Security = share
[Share]
Path =/(this row indicates the directory to be shared)
Writeable = yes (this row indicates whether you have the write permission)
Guest OK = yes, save and exit (this line indicates whether the guest user can log on)
6.4 enter testparm to check whether the configuration is correct. If it is correct, the configuration content above will be displayed.
6.5 enter service smb restart to restart samba
6.6 enter service iptables stop to disable the linux Firewall
6.7 In windows, open the run dialog box, enter \ sambasvr, and press enter to access the shared directory of linux.
This is the end of samba. I have used the above content myself. If there are any mistakes, I still forget to give them some advice.
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