An Example suggestion for mount_smbfs(8) man page

Mehmet Erol Sanliturk m.e.sanliturk at gmail.com
Tue Apr 16 16:20:39 UTC 2013


Dear All ,

(1)

In the following page :

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/networking.html


there is a question :

11.16. How do I mount a disk from a Windows machine that is on my network,
like smbmount in Linux?


with the following text :

"
Use the SMBFS toolset. It includes a set of kernel modifications and a set
of userland programs.
The programs and information are available as mount_smbfs(8) in the base
system.
"

In the referenced man page :


http://www.freebsd.org/cgi/man.cgi?query=mount_smbfs&sektion=8


there is the following example :

"
EXAMPLES
     The following example illustrates how to connect to SMB server SAMBA as
     user GUEST, and mount shares PUBLIC and TMP:

       mount_smbfs -I samba.mydomain.com //guest at samba/public /smb/public
       mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest at samba/tmp
/smb/tmp

     It is also possible to use fstab(5) for smbfs mounts (the example below
     doesn't prompt for a password):

       //guest at samba/public    /smb/public       smbfs  rw,noauto,-N 0   0


"



The part about /etc/fstab file of this example is not working .

A working example is generated via the following mail thread :

http://lists.freebsd.org/pipermail/freebsd-questions/2013-April/250500.html

beginning from :

http://lists.freebsd.org/pipermail/freebsd-questions/2013-April/250496.html


The following text may be inserted instead of the existing /etc/fstab part :

---------------------------------------------------------------------------------------



If the following values are not defined in the Windows XP computer ,


"Workgroup" : Work_Group_NAME_in_Windows :
"Computer name" : NetBIOS_NAME_in_Windows
IP v4 number of the Windows computer IP_Number_of_the_Windows_Computer such
as 192.168.10.30 with net mask
255.255.255.0 .
( The entered IP number is shown as 192.168.20.255 . )

Share_Name_in_Windows

define them by logging as an administrator :

>From Windows Explorer -> My Computer -> Control Panel -> Performance and
Maintenance ->
System -> Computer Name -> Change -> More -> ...


It is also possible to use fstab(5) for smbfs mounts .
The password for the Windows administrator is asked during boot .


To define a share , use Windows Explorer :

Highlight a drive or a directory :
Click the Right mouse button .
>From displayed form : Click "Sharing and Security ..."
Mark Radio button :  "Share this folder"

If it is a directory , either accept default name or give a new name .
If it is a drive , a fixed name is assigned such as G$ for G: drive .

The given name is called here as Share_Name_in_Windows .



With the above values :

/etc/nsmb.conf :

-----------------------------


[default]
Workgroup=Work_Group_NAME_in_Windows

[NetBIOS_NAME_in_Windows]
addr=IP_Number_of_the_Windows_Computer

-----------------------------

The following values are NOT required ( they are not taken into
consideration ) :

        [NetBIOS_NAME_in_Windows:user_name_in_Windows_Administrators]
        password=MYTOPSECRETPASSWORD

During boot , the password is asked .
Without password , Windows XP is not allowing access to the share .


/etc/hosts  :

-----------------------------

IP_Number_of_the_Windows_Computer   NetBIOS_NAME_in_Windows


-----------------------------


/etc/fstab :


-----------------------------


//user_name_in_Windows_Administrators at NetBIOS_NAME_in_Windows/Share_Name_in_Windows
/mnt smbfs  rw 0  0


-----------------------------


If a mount statement is used instead of /etc/fstab entry ( or if the share
is unmounted during server working and remounted manually ) :

mount_smbfs -I IP_Number_of_the_Windows_Computer
//user_name_in_Windows_Administrators at NetBIOS_NAME_in_Windows/Share_Name_in_Windows
/mnt

( Password will be asked during mount , do not specify any password in
anywhere , these are not taking into consideration .)

where /mnt is the mount directory in FreeBSD server ,
the IP v4 number IP_Number_of_the_Windows_Computer will be replaced by
actual IP number .

---------------------------------------------------------------------------------------


(2)

At the end of the following page :

---------------------------------------------------------------------------------------

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-samba.html

the following paragraph may be added :


"
39.9.4 Becoming a Client to a Windows XP Computer

For this purpose , please study

mount_smbfs(8)

man page .
"
---------------------------------------------------------------------------------------


Thank you very much .

Mehmet Erol Sanliturk


More information about the freebsd-doc mailing list