2002-04-22 16:15:20 +00:00
|
|
|
.\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $
|
2003-07-31 11:50:01 +00:00
|
|
|
.\" $FreeBSD$
|
2002-04-22 16:15:20 +00:00
|
|
|
.Dd March 10, 2000
|
2001-12-14 11:06:03 +00:00
|
|
|
.Dt MOUNT_SMBFS 8
|
2002-04-22 16:15:20 +00:00
|
|
|
.Os
|
2001-12-14 11:06:03 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm mount_smbfs
|
2002-04-22 16:15:20 +00:00
|
|
|
.Nd "mount a shared resource from an SMB file server"
|
2001-12-14 11:06:03 +00:00
|
|
|
.Sh SYNOPSIS
|
2002-04-22 16:15:20 +00:00
|
|
|
.Nm
|
|
|
|
.Op Fl E Ar cs1 : Ns Ar cs2
|
2001-12-14 11:06:03 +00:00
|
|
|
.Op Fl I Ar host
|
|
|
|
.Op Fl L Ar locale
|
2002-04-22 16:15:20 +00:00
|
|
|
.Op Fl M Ar crights : Ns Ar srights
|
2001-12-14 11:06:03 +00:00
|
|
|
.Op Fl N
|
2002-04-22 16:15:20 +00:00
|
|
|
.Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
|
2001-12-14 11:06:03 +00:00
|
|
|
.Op Fl R Ar retrycount
|
|
|
|
.Op Fl T Ar timeout
|
|
|
|
.Op Fl W Ar workgroup
|
|
|
|
.Op Fl c Ar case
|
|
|
|
.Op Fl d Ar mode
|
|
|
|
.Op Fl f Ar mode
|
|
|
|
.Op Fl g Ar gid
|
|
|
|
.Op Fl n Ar opt
|
|
|
|
.Op Fl u Ar uid
|
2002-04-22 16:15:20 +00:00
|
|
|
.Sm off
|
|
|
|
.No // Ar user No @ Ar server No / Ar share
|
|
|
|
.Sm on
|
2001-12-14 11:06:03 +00:00
|
|
|
.Ar node
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command mounts a share from a remote server using SMB/CIFS protocol.
|
|
|
|
.Pp
|
2002-04-22 16:15:20 +00:00
|
|
|
The options are as follows:
|
2001-12-14 11:06:03 +00:00
|
|
|
.Bl -tag -width indent
|
2002-04-22 16:15:20 +00:00
|
|
|
.It Fl E Ar cs1 : Ns Ar cs2
|
2001-12-14 11:06:03 +00:00
|
|
|
Specifies local
|
2002-04-22 16:15:20 +00:00
|
|
|
.Pq Ar cs1
|
2001-12-14 11:06:03 +00:00
|
|
|
and server's
|
2002-04-22 16:15:20 +00:00
|
|
|
.Pq Ar cs2
|
2001-12-14 11:06:03 +00:00
|
|
|
character sets.
|
|
|
|
.It Fl I Ar host
|
|
|
|
Do not use NetBIOS name resolver and connect directly to
|
|
|
|
.Ar host ,
|
|
|
|
which can be either a valid DNS name or an IP address.
|
|
|
|
.It Fl L Ar locale
|
|
|
|
Use
|
|
|
|
.Ar locale
|
|
|
|
for lower/upper case conversion routines.
|
|
|
|
Set the locale for case conversion.
|
2002-04-22 16:15:20 +00:00
|
|
|
By default,
|
2001-12-14 11:06:03 +00:00
|
|
|
.Nm
|
|
|
|
tries to use an environment variable
|
2002-04-22 16:15:20 +00:00
|
|
|
.Ev LC_*
|
2001-12-14 11:06:03 +00:00
|
|
|
to determine it.
|
2002-04-22 16:15:20 +00:00
|
|
|
.It Fl M Ar crights : Ns Ar srights
|
2001-12-14 11:06:03 +00:00
|
|
|
Assign access rights to the newly created connection.
|
|
|
|
See
|
|
|
|
.Xr nsmb 8
|
|
|
|
for theory.
|
|
|
|
.It Fl N
|
|
|
|
Do not ask for a password.
|
|
|
|
At run time,
|
|
|
|
.Nm
|
|
|
|
reads the
|
|
|
|
.Pa ~/.nsmbrc
|
|
|
|
file for additional configuration parameters and a password.
|
2002-04-22 16:15:20 +00:00
|
|
|
If no password is found,
|
2001-12-14 11:06:03 +00:00
|
|
|
.Nm
|
|
|
|
prompts for it.
|
2002-04-22 16:15:20 +00:00
|
|
|
.It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
|
2001-12-14 11:06:03 +00:00
|
|
|
Assign owner/group attributes to the newly created connection.
|
|
|
|
See
|
|
|
|
.Xr nsmb 8
|
|
|
|
for theory.
|
|
|
|
.It Fl R Ar retrycount
|
|
|
|
How many retries should be done before the SMB requester decides to drop
|
|
|
|
the connection.
|
|
|
|
.It Fl T Ar timeout
|
|
|
|
Timeout in seconds for each request.
|
|
|
|
.It Fl W Ar workgroup
|
|
|
|
This option specifies the workgroup to be used in the authentication request.
|
|
|
|
.It Fl c Ar case
|
|
|
|
Set a
|
2002-04-22 16:15:20 +00:00
|
|
|
.Ar case
|
2001-12-14 11:06:03 +00:00
|
|
|
option which affects name representation.
|
2002-04-22 16:15:20 +00:00
|
|
|
.Ar case
|
2001-12-14 11:06:03 +00:00
|
|
|
can be one of the following:
|
2002-04-22 16:15:20 +00:00
|
|
|
.Bl -tag -width ".Em Value"
|
2001-12-14 11:06:03 +00:00
|
|
|
.It Em Value
|
|
|
|
.Em Meaning
|
2002-04-22 16:15:20 +00:00
|
|
|
.It Cm l
|
|
|
|
All existing file names are converted to lower case.
|
2001-12-14 11:06:03 +00:00
|
|
|
Newly created file gets a lower case.
|
2002-04-22 16:15:20 +00:00
|
|
|
.It Cm u
|
|
|
|
All existing file names are converted to upper case.
|
|
|
|
Newly created file gets an upper case.
|
2001-12-14 11:06:03 +00:00
|
|
|
.El
|
|
|
|
.It Fl f Ar mode , Fl d Ar mode
|
|
|
|
Specify permissions that should be assigned to files and directories.
|
|
|
|
The values must be specified as octal numbers.
|
|
|
|
Default value for the file mode
|
2002-04-22 16:15:20 +00:00
|
|
|
is taken from mount point, default value for the directory mode adds execute
|
2001-12-14 11:06:03 +00:00
|
|
|
permission where the file mode gives read permission.
|
2001-12-20 16:16:25 +00:00
|
|
|
.Pp
|
2001-12-14 11:06:03 +00:00
|
|
|
Note that these permissions can differ from the rights granted by SMB
|
2002-04-22 16:15:20 +00:00
|
|
|
server.
|
2001-12-14 11:06:03 +00:00
|
|
|
.It Fl u Ar uid , Fl g Ar gid
|
2002-04-22 16:15:20 +00:00
|
|
|
User ID and group ID assigned to files.
|
|
|
|
The default are owner and group IDs from
|
|
|
|
the directory where the volume is mounted.
|
|
|
|
.It No // Ns Ar user Ns @ Ns Ar server Ns / Ns Ar share
|
2001-12-14 11:06:03 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command will use
|
|
|
|
.Ar server
|
|
|
|
as the NetBIOS name of remote computer,
|
|
|
|
.Ar user
|
|
|
|
as the remote user name and
|
|
|
|
.Ar share
|
|
|
|
as the resource name on a remote server.
|
|
|
|
.It Ar node
|
|
|
|
Path to mount point.
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
2002-04-22 16:15:20 +00:00
|
|
|
.Bl -tag -width ".Pa ~/.nsmbrc" -compact
|
2001-12-14 11:06:03 +00:00
|
|
|
.It Pa ~/.nsmbrc
|
|
|
|
Keeps static parameters for connections and other information.
|
|
|
|
See
|
2003-07-31 11:50:01 +00:00
|
|
|
.Pa /usr/share/examples/smbfs/dot.nsmbrc
|
2001-12-14 11:06:03 +00:00
|
|
|
for details.
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
2002-04-22 16:15:20 +00:00
|
|
|
The following example illustrates how to connect to SMB server
|
2001-12-14 11:06:03 +00:00
|
|
|
.Em SAMBA
|
|
|
|
as user
|
2002-04-22 16:15:20 +00:00
|
|
|
.Em GUEST ,
|
2001-12-14 11:06:03 +00:00
|
|
|
and mount shares
|
|
|
|
.Em PUBLIC
|
|
|
|
and
|
|
|
|
.Em TMP :
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
mount_smbfs -I samba.mydomain.com //guest@samba/public /smb/public
|
|
|
|
mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest@samba/tmp /smb/tmp
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
It is possible to use
|
|
|
|
.Xr fstab 5
|
|
|
|
for smbfs mounts:
|
2002-04-22 16:15:20 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "//guest@samba/public /smb/public smbfs rw,noauto 0 0"
|
2001-12-14 11:06:03 +00:00
|
|
|
.Sh BUGS
|
|
|
|
Please report bugs to the author.
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Boris Popov Aq bp@butya.kz ,
|
2002-04-22 16:15:20 +00:00
|
|
|
.Aq bp@FreeBSD.org
|