2003-11-10 00:24:15 +03:00
|
|
|
.\" $NetBSD: mount_smbfs.8,v 1.11 2003/11/09 21:24:15 wiz Exp $
|
2003-03-03 10:32:29 +03:00
|
|
|
.\" from: Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp
|
2003-02-18 23:31:19 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2003-11-10 00:24:15 +03:00
|
|
|
.Dd November 9, 2003
|
2003-02-16 11:15:07 +03:00
|
|
|
.Dt MOUNT_SMBFS 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mount_smbfs
|
2003-03-31 21:22:31 +04:00
|
|
|
.Nd "mount a shared resource from an SMB/CIFS file server"
|
2003-02-16 11:15:07 +03:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl E Ar cs1 : Ns Ar cs2
|
|
|
|
.Op Fl I Ar host
|
|
|
|
.Op Fl L Ar locale
|
|
|
|
.Op Fl M Ar crights : Ns Ar srights
|
|
|
|
.Op Fl N
|
|
|
|
.Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
|
|
|
|
.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
|
|
|
|
.Sm off
|
2003-07-05 00:20:22 +04:00
|
|
|
.No // Ar user No @ Ar server / Ar share
|
2003-02-16 11:15:07 +03:00
|
|
|
.Sm on
|
|
|
|
.Ar node
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command mounts a share from a remote server using SMB/CIFS protocol.
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl E Ar cs1 : Ns Ar cs2
|
|
|
|
Specifies local
|
|
|
|
.Pq Ar cs1
|
|
|
|
and server's
|
|
|
|
.Pq Ar cs2
|
|
|
|
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.
|
|
|
|
By default,
|
|
|
|
.Nm
|
|
|
|
tries to use an environment variable
|
|
|
|
.Ev LC_*
|
|
|
|
to determine it.
|
|
|
|
.It Fl M Ar crights : Ns Ar srights
|
|
|
|
Assign access rights to the newly created connection.
|
2003-04-01 15:24:47 +04:00
|
|
|
.\" See
|
|
|
|
.\" .Xr nsmb 8
|
|
|
|
.\" for theory.
|
2003-02-16 11:15:07 +03:00
|
|
|
.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.
|
|
|
|
If no password is found,
|
|
|
|
.Nm
|
|
|
|
prompts for it.
|
2003-07-05 00:20:22 +04:00
|
|
|
.It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
|
2003-02-16 11:15:07 +03:00
|
|
|
Assign owner/group attributes to the newly created connection.
|
2003-04-01 15:24:47 +04:00
|
|
|
.\" See
|
|
|
|
.\" .Xr nsmb 8
|
|
|
|
.\" for theory.
|
2003-02-16 11:15:07 +03:00
|
|
|
.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
|
|
|
|
.Ar case
|
|
|
|
option which affects name representation.
|
|
|
|
.Ar case
|
|
|
|
can be one of the following:
|
|
|
|
.Bl -tag -width ".Em Value"
|
|
|
|
.It Em Value
|
|
|
|
.Em Meaning
|
|
|
|
.It Cm l
|
|
|
|
All existing file names are converted to lower case.
|
|
|
|
Newly created file gets a lower case.
|
|
|
|
.It Cm u
|
|
|
|
All existing file names are converted to upper case.
|
|
|
|
Newly created file gets an upper case.
|
|
|
|
.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
|
|
|
|
is taken from mount point, default value for the directory mode adds execute
|
|
|
|
permission where the file mode gives read permission.
|
|
|
|
.Pp
|
|
|
|
Note that these permissions can differ from the rights granted by SMB
|
|
|
|
server.
|
|
|
|
.It Fl u Ar uid , Fl g Ar gid
|
|
|
|
User ID and group ID assigned to files.
|
|
|
|
The default are owner and group IDs from
|
|
|
|
the directory where the volume is mounted.
|
2003-07-05 00:20:22 +04:00
|
|
|
.It No // Ns Ar user Ns @ Ns Ar server Ns / Ns Ar share
|
2003-02-16 11:15:07 +03: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.
|
2003-11-10 00:19:31 +03:00
|
|
|
If your connections are refused, try using the
|
2003-11-10 00:24:15 +03:00
|
|
|
.Fl I
|
2003-11-10 00:19:31 +03:00
|
|
|
option and use a server name of "*SMBSERVER".
|
2003-02-16 11:15:07 +03:00
|
|
|
.It Ar node
|
|
|
|
Path to mount point.
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
2003-04-04 11:57:58 +04:00
|
|
|
.Bl -tag -width " /etc/nsmb.conf" -compact
|
|
|
|
.It Pa /etc/nsmb.conf
|
|
|
|
System wide parameters for smbfs mounts.
|
2003-02-16 11:15:07 +03:00
|
|
|
.It Pa ~/.nsmbrc
|
|
|
|
Keeps static parameters for connections and other information.
|
|
|
|
See
|
2003-04-04 11:57:58 +04:00
|
|
|
.Pa /usr/share/examples/smbfs/dot.nsmbrc
|
2003-02-16 11:15:07 +03:00
|
|
|
for details.
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
The following example illustrates how to connect to SMB server
|
|
|
|
.Em SAMBA
|
|
|
|
as user
|
|
|
|
.Em GUEST ,
|
|
|
|
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
|
2003-11-10 00:19:31 +03:00
|
|
|
If you keep on getting "Connection reset by peer" errors, try:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
mount_smbfs -N -I 10.0.0.4 //'*SMBSERVER'/tmp /smb/tmp
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2003-02-16 11:15:07 +03:00
|
|
|
It is possible to use
|
|
|
|
.Xr fstab 5
|
|
|
|
for smbfs mounts:
|
|
|
|
.Pp
|
|
|
|
.Dl "//guest@samba/public /smb/public smbfs rw,noauto 0 0"
|
2003-02-18 23:31:19 +03:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mount 8
|
|
|
|
.Sh HISTORY
|
|
|
|
Support for SMBFS first appeared in
|
|
|
|
.Fx 4.4 .
|
|
|
|
It has been ported to
|
2003-03-03 10:32:29 +03:00
|
|
|
.Nx
|
2003-02-18 23:31:19 +03:00
|
|
|
and first appeared in
|
|
|
|
.Nx 2.0 .
|
2003-02-16 11:15:07 +03:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An Boris Popov Aq bp@butya.kz ,
|
2003-02-18 23:31:19 +03:00
|
|
|
.Aq bp@FreeBSD.org .
|
|
|
|
.Nx
|
|
|
|
port done by
|
|
|
|
.An Matt Debergalis
|
|
|
|
.Aq deberg@NetBSD.org ,
|
|
|
|
and
|
|
|
|
.An Jaromir Dolecek
|
|
|
|
.Aq jdolecek@NetBSD.org .
|