First of all, let's talk about some common methods of mount.cifs mount
Can be mounted directly manually:
# mount-t Cifs-o username=<username>,password=<password>//192.168.10.10/sharedir/mnt/dir
You can also write to a random automatic mount in the Fstab file:
192.168.10.10/sharedir/mnt/dir CIFS defaults,username=<username>,password=<password> 0 0
However, it is not very good to write the username and password directly in the Fstab file, which is generally not recommended. You can save the user name and password to another file, and in Fstab, specify the file to read:
192.168.10.10/sharedir/mnt/dir CIFS defaults,credentials=/root/pw.txt 0 0
Where Pw.txt file content:
User=<username>
Password=<password>
Then set the file permission to 400.
Now the problem, I follow this way to find that always can not be randomly mounted automatically, the system log error is as follows:
CIFS Vfs:no username specified
CIFS Vfs:cifs_mount failed W/return code = 22
Find information online, found that the original is not installed Cifs-utils package caused, yum after installation, everything is normal!
Note: Using the user and the username effect is the same.
This article is from the "He-shore" blog, please make sure to keep this source http://jiangyapeng.blog.51cto.com/3491398/1561868
About Linux Mount error: Problem processing of CIFS Vfs:no username specified