Mount 2011-03-16 15:15:17 with smbmount command on Linux
Classification:
When a Linux client connects to a Samba/windows file server, it needs to use the Smbmount or Mount directive:
Smbmount//sambaserver/d/mnt/d-o username=aaa,password=bbb
Smbmount//sambaserver/d/mnt/d-o username=aaa%bbb
Mount-t smbfs-o username=aaa,password=bbb//sambaserver/d/mnt/d
Mount-t smbfs-o username=aaa%bbb//sambaserver/d/mnt/d
Smbclient//sambaserver/d-U username%password
If there is errdos-errnosuchshare .....
Please note that the IP address is not on the server but on the network.
Like a/home/abc on a server.
Then the order should be
Mount-o username=aaa,password=bbb//xxx.xxx.xxx.xxx/abc/mnt
Attention:
1. Specify the UID or GID parameter, or specify the user's identity (uid= can be followed by the UID number or user name), such as:
Smbmount//test/d/mnt/d-o uid=grind
2. Smbmount can also write Mount.smbfs, which is a symbolic link;
3. The parameters of the Smbmount must be written at the end, while the position of the mount parameter can be changed;
4. Since the//sambaserver/d format can be shown to mount on the SMBFS, the T-smbfs parameters of the mount can be omitted;
5. If the command line does not add a password, the next line will prompt you to enter the system;
6. After the success of Smbclient, will appear ftp similar interface, please follow the FTP
There was a problem today, after Linux mounted the shared file for Windows, the compilation prompts: The value is too large for the defined data type (value too large for defined data type);
Google a bit and found the solution:
sudo mount-t SMB//192.168.100.16/src/src-o Username=test,uid=test,nounix,noserverino
sudo mount-t cifs-o Username=wx,passwd=wx,nounix,noserverino//192.168.1.108/vm_share/mnt/share
$ sudo mount -o "USERNAME=<USERNAME>,PASSWORD=<PASSWORD>,UID=<UID> Gid=<gid>,dir_mode=0755,file_mode=0755,nounix,noserverino " //
can only be followed by a parameter Nounix,noserverino.