Merge from vendor branch HEIMDAL:
[dragonfly.git] / contrib / smbfs / mount_smbfs / mount_smbfs.8
1 .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $
2 .Dd March 10, 2000
3 .Dt MOUNT_SMBFS 8
4 .Os
5 .Sh NAME
6 .Nm mount_smbfs
7 .Nd "mount a shared resource from an SMB file server"
8 .Sh SYNOPSIS
9 .Nm
10 .Op Fl E Ar cs1 : Ns Ar cs2
11 .Op Fl I Ar host
12 .Op Fl L Ar locale
13 .Op Fl M Ar crights : Ns Ar srights
14 .Op Fl N
15 .Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
16 .Op Fl R Ar retrycount
17 .Op Fl T Ar timeout
18 .Op Fl W Ar workgroup
19 .Op Fl c Ar case
20 .Op Fl d Ar mode
21 .Op Fl f Ar mode
22 .Op Fl g Ar gid
23 .Op Fl n Ar opt
24 .Op Fl u Ar uid
25 .Sm off
26 .No // Ar user No @ Ar server No / Ar share
27 .Sm on
28 .Ar node
29 .Sh DESCRIPTION
30 The
31 .Nm
32 command mounts a share from a remote server using SMB/CIFS protocol.
33 .Pp
34 The options are as follows:
35 .Bl -tag -width indent
36 .It Fl E Ar cs1 : Ns Ar cs2
37 Specifies local
38 .Pq Ar cs1
39 and server's
40 .Pq Ar cs2
41 character sets.
42 .It Fl I Ar host
43 Do not use NetBIOS name resolver and connect directly to
44 .Ar host ,
45 which can be either a valid DNS name or an IP address.
46 .It Fl L Ar locale
47 Use
48 .Ar locale
49 for lower/upper case conversion routines.
50 Set the locale for case conversion.
51 By default,
52 .Nm
53 tries to use an environment variable
54 .Ev LC_*
55 to determine it.
56 .It Fl M Ar crights : Ns Ar srights
57 Assign access rights to the newly created connection.
58 See
59 .Xr nsmb 8
60 for theory.
61 .It Fl N
62 Do not ask for a password.
63 At run time,
64 .Nm
65 reads the
66 .Pa ~/.nsmbrc
67 file for additional configuration parameters and a password.
68 If no password is found,
69 .Nm
70 prompts for it.
71 .It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
72 Assign owner/group attributes to the newly created connection.
73 See
74 .Xr nsmb 8
75 for theory.
76 .It Fl R Ar retrycount
77 How many retries should be done before the SMB requester decides to drop
78 the connection.
79 .It Fl T Ar timeout
80 Timeout in seconds for each request.
81 .It Fl W Ar workgroup
82 This option specifies the workgroup to be used in the authentication request.
83 .It Fl c Ar case
84 Set a
85 .Ar case
86 option which affects name representation.
87 .Ar case
88 can be one of the following:
89 .Bl -tag -width ".Em Value"
90 .It Em Value
91 .Em Meaning
92 .It Cm l
93 All existing file names are converted to lower case.
94 Newly created file gets a lower case.
95 .It Cm u
96 All existing file names are converted to upper case.
97 Newly created file gets an upper case.
98 .El
99 .It Fl f Ar mode , Fl d Ar mode
100 Specify permissions that should be assigned to files and directories.
101 The values must be specified as octal numbers.
102 Default value for the file mode
103 is taken from mount point, default value for the directory mode adds execute
104 permission where the file mode gives read permission.
105 .Pp
106 Note that these permissions can differ from the rights granted by SMB
107 server.
108 .It Fl u Ar uid , Fl g Ar gid
109 User ID and group ID assigned to files.
110 The default are owner and group IDs from
111 the directory where the volume is mounted.
112 .It No // Ns Ar user Ns @ Ns Ar server Ns / Ns Ar share
113 The
114 .Nm
115 command will use
116 .Ar server
117 as the NetBIOS name of remote computer,
118 .Ar user
119 as the remote user name and
120 .Ar share
121 as the resource name on a remote server.
122 .It Ar node
123 Path to mount point.
124 .El
125 .Sh FILES
126 .Bl -tag -width ".Pa ~/.nsmbrc" -compact
127 .It Pa ~/.nsmbrc
128 Keeps static parameters for connections and other information.
129 See
130 .Pa ./examples/dot.nsmbrc
131 for details.
132 .El
133 .Sh EXAMPLES
134 The following example illustrates how to connect to SMB server
135 .Em SAMBA
136 as user
137 .Em GUEST ,
138 and mount shares
139 .Em PUBLIC
140 and
141 .Em TMP :
142 .Bd -literal -offset indent
143 mount_smbfs -I samba.mydomain.com //guest@samba/public /smb/public
144 mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest@samba/tmp /smb/tmp
145 .Ed
146 .Pp
147 It is possible to use
148 .Xr fstab 5
149 for smbfs mounts:
150 .Pp
151 .Dl "//guest@samba/public    /smb/public     smbfs  rw,noauto 0   0"
152 .Sh BUGS
153 Please report bugs to the author.
154 .Sh AUTHORS
155 .An Boris Popov Aq bp@butya.kz ,
156 .Aq bp@FreeBSD.org