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