Summary of samba Server installation under virtual machine redhat
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Summary of samba Server installation under virtual machine redhat-Linux Enterprise Application-Linux server application information. The following is a detailed description. After a virtual machine redhat is installed, the samba server cannot be used. Because I want to share things with virtual machines and windows (usually code) both at home and in the company ), of course, you can solve this problem by using windows sharing and using mount on a virtual machine, but there are also hidden dangers. On the one hand, you do not want to write your own things to be seen by others, on the other hand, setting the directory permission in windows to read and write is also super uncomfortable. So I checked the information online and completed the samba server. Now let's summarize my installation.
First, enter rpm-qa | samba in shell to check whether the following three files exist.
If there is no such file, you can only install it. In windows, place the image file into the virtual optical drive, and the virtual opportunity will be automatically mounted, enter/mnt/cdrom/RedHat/RPMS and enter rpm-ivh samba *. rpm is enough.
Due to security concerns, you must set the access permission password for linux. Because I usually log on to the system as a root user, and here I create a new account named sumsky under redhat, enter smbpasswd-a sumsky in shell to add the sumsky user to the samba password file, and prompt you to enter the password. The default file storage location is under/etc/samba, and the file name is sampasswd. If not, create a file like this. Of course, you can also modify the default storage location in the configuration file smb. conf. This file is automatically associated with your system's passwd file.
Smb will appear under/etc/samba/after installation. conf file, that is, the samba configuration file mentioned above. Modify the options here and change the security value to user, in this way, you must enter a password in windows to access the Linux shared file. This is exactly what I want.
Next, modify smb. for the shared directory in conf, I set aside the [home] item and modified the last item. For other items, let them add the ';' sign in front of them, ignore them. The following is the last configuration that I modified. sumsky is the user I created above and the shared directory is/usr.
Comment = sumsky's stuff
Valid usr = sumsky
Public = yes
Writable = yes
Printable = no
Creat mask = 0765
Now, save and exit.
Now the rest is to enable the samba service.
/Etc/init. d/smb start
Now, I am not in a rush to enter an ip address in windows. First, try it. My windows IP address is 192.168.0.11, and the virtual machine is 192.1168.0.12. Enter
This command is used to connect to the host 192.168.0.11, that is, windows.
Connect to itself
If neither of these two commands is reflected, the redhat firewall may be playing a strange role.
Clearing firewall rules is a lazy practice. I am just lazy.
Now try the two commands above, which can be connected.
The rest is to enter the Virtual Machine IP address in windows, open my computer, enter \ 192.168.1.12 in the status bar, and a prompt will be prompted to enter the password, enter the password you created when creating the samba user (not the logon password. This is a two-case code. That is to say, you have an account, a password for logging on to the system, and a password for logging on to the samba server ), now we can see the shared directory under the linux for a long time.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.