On Tue, 11 Dec 2012 23:25:56 +0700, Hanafi Syahroini wrote:
> [nothing]
First of all, it's not uncommon to place the question into
the message body (which you did not), and using a descriptive
subject (which you did). :-)
So I assume your question is _how_ to mount a SMB share at
boot.
This can be easily done by adding the required line to the
/etc/fstab file. Because network connection is required to
perform the mount, you could use the "late" option in
addition to other options you might need. See "man mount"
for detais, as well as /etc/rc.d/mountlate.
The line would be like this:
//USERNAME at SERVERNAME/share /smb/share smbfs rw,late 0 0
In this example, SERVERNAME is the server to access, and "share"
the name of the share; /smb/share will be the directory it will
be mounted at.
Access to multiple "drive letters" would look like this:
//Administrator at WINPC/a$ /smb/a smbfs rw,late 0 0
//Administrator at WINPC/c$ /smb/c smbfs rw,late 0 0
//Administrator at WINPC/d$ /smb/d smbfs rw,late 0 0
//Administrator at WINPC/e$ /smb/e smbfs rw,late 0 0
//Administrator at WINPC/f$ /smb/f smbfs rw,late 0 0
Here "WINPC" is the name of the server. Using "Administrator"
in this case is not safe, but no problem in settings where
people don't care for security anyway. :-)
Also see "man smbfs" and "man fstab" for details.
It might be required to put additional information in
/etc/nsmb.conf, for example:
[default]
workgroup=YOUR_WORKGROUP_NAME
[SERVERNAME]
addr=192.168.2.2
[SERVERNAME:USERNAME]
password=TOPSECRET
Substitute SERVERNAME, USERNAME and TOPSECRET for the
organisational information and access credentials that apply.
See "man nsmb.conf" for details.
Further instructions can easily be found in the online docs:
http://www.freebsd.org/doc/faq/book.html#mount-smb-sharehttp://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-samba.html
Note that if you still encounter network problems, it's better
to write a short rc.d style script that performs the mount_smb
commands, and use the proper keywords to have it run when the
network connection is up and running. See "man rc.d" for
details.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...