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