fs-cifs

Common Internet Filesystem or SMB client filesystem (QNX Neutrino)

Note: You must be root or have the right abilities to start this manager.

Syntax:

fs-cifs [-a] [-D] [-d name] [-g] [-h] [-L|-l] [-o option[,option...]]
        [-s mode] [-t n] [-v[v]...] [-Z n]
        [[//netbiosname:]server:/share
        prefix user passwd]

Runs on:

QNX Neutrino

Options:

-a
Spoof POSIX attributes; calls to chmod() and chown() return EOK instead of ENOTSUP. Use -a to get rid of error messages from applications that attempt to set the mode or ownership of files and directories, such as cp.
-D
Run in the foreground.
-d name
Specify the domain name.
-g
Don't accept a guest session. The default is to accept the session credentials that the server gives. If guest credentials are unexpected, it may be that the credentials passed on the fs-cifs command line are incorrect, or the SMB server has been misconfigured.
-h
Display usage information.
-L
Ask the user to provide the password (the command line doesn't include password).
-l
(“el”) Ask the user to provide the name of the user and the password (the command line doesn't include user or password).
-o option[,option...]
Miscellaneous options; use commas to separate them. These options include:
  • old — don't use 64-bit filesystem dialects. By default, fs-cifs supports 64-bit filesystem operations.
  • plainpwd — if logging in with an encrypted password fails, try to log in by using the password unencrypted.
    Note: Sending passwords in plain text may be considered a security problem.

    If fs-cifs failed to authenticate with the server using an encrypted password, it used to then attempt to authenticate with the server using an older method while sending the password unencrypted. In QNX Neutrino 6.3.2 and later, fs-cifs sends the password encrypted, unless you specify the option -o plainpwd. You might need this option when mounting shares on older versions of Windows.

  • showpwd — show the plain-text password in the log file.
    Note: Adding the password to the log file may be a security problem if unauthorized personal have access to the log file.
  • timeout=n — set the reconnection timeout to be n seconds.
-s mode
Set the SMB-signature support mode:
  • 1 — require signatures in non-guest sessions.
  • 2 — don't use signatures.

The default is to use signatures in non-guest sessions if the server requires or supports signatures.

-t n
Allow up to n threads (default is 5). Use -t to tune resource usage; more threads require more resources (such as memory), but decrease filesystem latency.
-v[v...]
Verbose output. Additional v characters give more verbose output.
-Z n
The value of n indicates how to attach to the path:
  • B or b — attach before other managers.
  • A or a — attach after other managers.

The default is neither. For more information, see Pathname Management in the Process Manager chapter of the System Architecture guide.

[//netbiosname:]server:/share
Specify the server name or IP address and the shared resource name of the filesystem being mounted.
Note: If you specify a server name, there must be some way to resolve it to an IP address. See /etc/hosts or /etc/nsswitch.conf.

You must specify the netbiosname if:

  • The server's TCP/IP host name is different from its NetBIOS name

    Or:

  • The server host is running a Microsoft operating system.
prefix
Absolute path specifying where to mount share in the local filesystem.
user
Log on to the SMB server as user.
passwd
Log on to the SMB server with passwd.
Note: If your password includes characters that the shell considers to be special, you might have to enclose the password in quotation marks.

Description:

The fs-cifs filesystem manager is an SMB (also known as CIFS — Common Internet Filesystem) client operating over TCP/IP. SMB is a protocol for accessing resources in a controlled fashion over a LAN.

The fs-cifs filesystem manager is primarily intended for use as a client with Windows NT machines, although it also works with any SMB server (such as OS/2 Peer, LAN Manager, or SAMBA). To use fs-cifs, you must have an SMB server and a valid login on that server.

The fs-cifs filesystem manager also requires a TCP/IP transport layer, such as the one provided by io-pkt*.

You can mount SMB filesystems at the same time as you start fs-cifs; you can also mount them separately after you have started fs-cifs using the mount command.

If you want to mount filesystems separately, start fs-cifs without arguments, as a daemon, then create your mountpoints using mount specifying cifs as the type. See below for an example.

If syslogd is running, fs-cifs writes any error messages to the system log.

Abilities:

The fs-cifs manager may require the following abilities:

Use secpolmonitor to determine which abilities fs-cifs is using on your specific system.

For more information on abilities, see procmgr_ability() in the C Library Reference.

Examples:

Start fs-cifs and mount the QNX_BIN share as /bin from an SMB server named SMB_SERVER (with IP address 10.0.0.1) using the guest account and a password of none:

fs-cifs SMB_SERVER:/QNX_BIN /bin guest none

Or:

fs-cifs 10.0.0.1:/QNX_BIN /bin guest none

The same as the above, but with a server, called NB_NAME, running a Microsoft operating system:

fs-cifs //NB_NAME:SMB_SERVER:/QNX_BIN /bin guest none 

Or:

fs-cifs //NB_NAME:10.0.0.1:/QNX_BIN /bin guest none 

Ask the user for the password:

fs-cifs -L //NB_NAME:SMB_SERVER:/QNX_BIN /bin guest 

Ask the user for the name of the user and the password:

fs-cifs -l //NB_NAME:SMB_SERVER:/QNX_BIN /bin 

Mounts the server as the user in the QNX domain:

fs-cifs -d QNX //MS:10.1:/QNX_BIN /mnt user passwd

Start fs-cifs as a daemon, then mount the QNX_BIN share as /bin from an SMB server named SMB_SERVER (with IP address 10.0.0.1) using the guest account and a password of none:

fs-cifs &

Then:

mount -t cifs -o guest,none //SMB_SERVER:10.0.0.1:/QNX_BIN /bin

or:

mount -t cifs -o user=guest,password=none \
//SMB_SERVER:10.0.0.1:/QNX_BIN /bin

Files:

/dev/log
syslogd interface.

Caveats:

When the filesystem is mounted, everybody who uses the filesystem does so with the privileges of the user specified on the command line.

The passwd argument is required on the command-line even if user doesn't require a password; it can be anything other than whitespace.