Adds a CIFS mount to the /etc/filesystems file and performs the mount.
mkcifsmnt -f MountPoint -d RemoteShare -h RemoteHost -c user [-p password] [-m MountTypeName] [-A|-a] [-I|-B|-N] [-t {rw|ro}] [-u uid] [-g gid] [-x fmode] [-w wrkgrp]
The mkcifsmnt command constructs a CIFS entry that is appended to the /etc/filesystems file. It then attempts to mount the CIFS file system. Its options are parsed and prepared to be passed into the crfs command, which actually adds the CIFS entry to /etc/filesystems.
Item | Description |
---|---|
-a | Specifies that the /etc/filesystems entry for this file system should not be automatically mounted at system restart. This is the default. |
-A | Specifies that the /etc/filesystems entry for this file system should be automatically mounted at system restart. |
-B | Specifies that the entry should be added to the /etc/filesystems and that it should be mounted at system restart. |
-c user | Specifies user name used to gain access to the CIFS share. |
-d RemoteShare | Specifies the share name on the CIFS server that should be mounted. |
-f MountPoint | Specifies the path name over which the CIFS share should be mounted. |
-g gid | Specifies the GID that is assigned to files in the mount. The default is 0. |
-h RemoteHost | Specifies the name of the remote host (CIFS server). This can be provided as a host name, an IP address, or as a fully qualified domain name. |
-I | Specifies that the entry should be added to the /etc/filesystems file, but should not be mounted. |
-m MountTypeName | Defines the mount type that will be added to the /etc/filesystems file, which allows for mounting all file systems of a specific type using the -t option of the mount command. By default, no type value will be added to /etc/filesystems. |
-N | Mounts the CIFS share with the options specified, but does not modify the /etc/filesystems file. |
-p password | Specifies the password used to grant access to the specific user on the specific server. The specific credentials (server/user/password) are added to the cifscred file (the password will be encrypted). If the -p option is not specified, and the credentials do not already exist in the cifscred file, the command line prompts the user to provide the password, and the credentials will be added to the cifscred file. If the server/user credentials already exist in the cifscred file, this option is ignored, and the existing credentials are used for mounting. |
-t {rw|ro} | Specifies whether file system should be mounted as read-only. The default is read-write (rw). |
-u uid | Specifies the UID that is assigned to files in the mount. The default is 0. |
-x fmode | Specifies the owner, group, and other permission bits assigned to files in the mount. The default is 755. |
-w wrkgrp | Specifies the domain that should be used to authenticate the user during mount. If this option is not used, authentication is handled locally by the CIFS server. |
Item | Description |
---|---|
0 | The command completed successfully. |
>0 | An error occurred. |
You must have root authority to run this command.
mkcifsmnt -f /mnt -d share1 -h server1 -c user1
/usr/sbin/mkcifsmnt
Item | Description |
---|---|
/etc/cifs_fs/cifscred | Stores the CIFS credentials. |
/etc/filesystems | Stores the CIFS entry. |