Date: Tue, 11 Dec 2012 14:08:38 -0800 (PST) From: Bill Tillman <btillman99@yahoo.com> To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Mounting a samba share on boot? Message-ID: <1355263718.29274.YahooMailNeo@web165003.mail.bf1.yahoo.com> In-Reply-To: <20121211175759.310ec79f.freebsd@edvax.de> References: <CAON8%2BsbL_1AOF7vaqDg1AeX0Gi2ZL9fCT80Zf1Rxrv8ieDDM=Q@mail.gmail.com> <20121211175759.310ec79f.freebsd@edvax.de>
index | next in thread | previous in thread | raw e-mail
________________________________ From: Polytropon <freebsd@edvax.de> To: Hanafi Syahroini <hanafi@zigma-jp.com> Cc: freebsd-questions@freebsd.org Sent: Tuesday, December 11, 2012 11:57 AM Subject: Re: Mounting a samba share on boot? 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@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@WINPC/a$ /smb/a smbfs rw,late 0 0 //Administrator@WINPC/c$ /smb/c smbfs rw,late 0 0 //Administrator@WINPC/d$ /smb/d smbfs rw,late 0 0 //Administrator@WINPC/e$ /smb/e smbfs rw,late 0 0 //Administrator@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-share http://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, ... _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" That's a great answer but let me insert that most people, not all but most, do not use Samba to access a server from other FreeBSD servers. So I feel the two replies thus far are overkill. Typically, Samba is used so that Windows or other SMB type OS'es can access the server. That said, I would simplify all this with the way I have mine setup. You will of course need the shares configured in your smb.conf, then simply put a command in your /etc/rc.local or /etc/rc.d/ to launch smdb and nmbd. I don't rely on anything in /etc/fstab to use samba. It's all in my smb.conf file. However, Polytropon has presented a great answer here. From owner-freebsd-questions@FreeBSD.ORG Tue Dec 11 22:13:27 2012 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5147245C; Tue, 11 Dec 2012 22:13:27 +0000 (UTC) (envelope-from vrwmiller@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 983E68FC16; Tue, 11 Dec 2012 22:13:26 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so4255865lah.13 for <multiple recipients>; Tue, 11 Dec 2012 14:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s 120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jwoZtTsCwlw9bhanv8e2LmpmGRNTxSbnO4+QPd6sBZc=; b=YiH17uQPt06e1XPfHKwW0A7ll19/CAxNZHy/oikVRedUYuNEMWHzbX7WbdctAb6UnI lfoWEBQ+ZLCKmYoPhqELF0OBYIJd14g/p+DhDYHxM3/ynH5NaRzuv1sYUK70FwZTY4CP qIHSKCssW/UNQ0kTScYU9KgkmuXLOqV2kWm2XxuMlfULcgUby8tt5NgGUe7BsquPbk+A xlJW3axVZ5gVzFjAaMN9fbIU9U2+KgEtMUYe85mNqmzodaMRwoh1QP3K83Kzlxd/RjOn QUVwCdr9G827cU6ZS7TSQRBwFOB/eWG0KMi9hPWymOiom8kNz3ScjjdR03QuVl4nbQ93 9aVA=MIME-Version: 1.0 Received: by 10.112.44.225 with SMTP id h1mr8409032lbm.63.1355264004969; Tue, 11 Dec 2012 14:13:24 -0800 (PST) Sender: vrwmiller@gmail.com Received: by 10.112.3.68 with HTTP; Tue, 11 Dec 2012 14:13:24 -0800 (PST) In-Reply-To: <1531C946-2259-4295-B388-42DC94FBE7FB@fisglobal.com> References: <CAHzLAVHBfoodHoe72f9Ls_Wq1hnG8y-98DX7LkkZbsySjOdw@mail.gmail.com> <04ABE8E0-8D63-4C68-92C4-69B516818160@fisglobal.com> <CAHzLAVHVPpSA2azavb3wZ+AmN+YUPT22LAKMP6VF8envqRVVng@mail.gmail.com> <1531C946-2259-4295-B388-42DC94FBE7FB@fisglobal.com> Date: Tue, 11 Dec 2012 17:13:24 -0500 X-Google-Sender-Auth: FICsztrrQcux_uqqBkCzns0Q1aQ Message-ID: <CAHzLAVH582Fk+SgwBzkmm2n5_HUF8b5zW+_dchn+eS48XVDKZw@mail.gmail.com> Subject: Re: make release and mfsroot From: Rick Miller <vmiller@hostileadmin.com> To: Devin Teske <dteske@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Questions <freebsd-questions@freebsd.org> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 11 Dec 2012 22:13:27 -0000 On Tue, Dec 11, 2012 at 5:05 PM, Devin Teske <devin.teske@fisglobal.com> wrote: > > Though, to resize the mfsroot, I still rely on release(7) and the above > patches. Here's another question, have you applied this approach to boot_crunch.conf? I simply replaced the default boot_crunch.conf with my own in the source tree. This is how I discovered MFSSIZE, because the resulting boot_crunch binary was larger than the available space. -- Take care Rick Millerhelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1355263718.29274.YahooMailNeo>
