Professional Web Applications Themes

Automounting smbfs? - FreeBSD

The built-in amd automounter may work great for NFS, but I increasingly find myself mounting Windows shares and amd doesn't seem to support them. Any suggestions? -- Kirk Strauser -----BEGIN PGP SIGNATURE----- iD8DBQBCVsTT5sRg+Y0CpvERAn50AJ0V3nn88ptmeD5Bg8jBmg Az2LOFhgCdH7nN zs4ZlhkonciwgjB0lgBx5lM= =awh2 -----END PGP SIGNATURE-----...

  1. #1

    Default Automounting smbfs?

    The built-in amd automounter may work great for NFS, but I increasingly find
    myself mounting Windows shares and amd doesn't seem to support them. Any
    suggestions?
    --
    Kirk Strauser

    -----BEGIN PGP SIGNATURE-----

    iD8DBQBCVsTT5sRg+Y0CpvERAn50AJ0V3nn88ptmeD5Bg8jBmg Az2LOFhgCdH7nN
    zs4ZlhkonciwgjB0lgBx5lM=
    =awh2
    -----END PGP SIGNATURE-----

    Kirk Guest

  2. #2

    Default Re: Automounting smbfs?




    ----- Original Message -----
    From: "Kirk Strauser" <com>
    To: <org>
    Sent: Friday, April 08, 2005 12:52 PM
    Subject: Automounting smbfs?

    The built-in amd automounter may work great for NFS, but I increasingly find
    myself mounting Windows shares and amd doesn't seem to support them. Any
    suggestions?
    --
    Kirk Strauser



    Kirk, here's what I did to auto mount my pesky windows shared backup folder
    prior to having a seperate nfs mount to put them.


    Configure your share as noauto in /etc/fstab (example)

    ### SMBFS Mounts
    #
    #//usernameserver/share /<mount point> smbfs
    noauto,rw,-N,-I=<windows ip#> 0 0

    Then, in the root crontab, add this:

    "reboot /<path_to_your_script>/mbfs.sh"


    Then, in <path_to_your_script> create a file named mbfs.sh and edit it as
    such:

    #!/bin/sh
    echo " "
    echo " "
    echo "mounting smbfs slices..."
    sleep 5
    /sbin/mount /backups

    Please keep in mind, that this method will require the proper share auth
    info to be in /etc/nsmb.conf, so protect this file as it holds plain text
    passwords for your windows systems.

    Then on system restart, after everything else is accessible and running,
    cron will launch and remount those drives for you.

    Hope it helps.

    --

    Micheal Patterson
    Senior Communications Systems Engineer
    405-917-0600

    Confidentiality Notice: This e-mail message, including any attachments,
    is for the sole use of the intended recipient(s) and may contain
    confidential and privileged information. Any unauthorized review, use,
    disclosure or distribution is prohibited. If you are not the intended
    recipient, please contact the sender by reply e-mail and destroy all
    copies of the original message.

    Micheal Guest

  3. #3

    Default Re: Automounting smbfs?

    On Friday 08 April 2005 14:12, you wrote:
     

    [...]

    Out of curiosity, why would you do that instead of just letting FreeBSD
    mount it automatically (which is what I do now)?

    The goal I'm trying to accomplish is pushing the same map to multiple
    machines (eg via LDAP). I never bothered to do that with my NFS mounts,
    but I'm using the addition of the SMB shares as an excuse to rework the
    system before it grows much more.
    --
    Kirk Strauser

    -----BEGIN PGP SIGNATURE-----

    iD8DBQBCVuxS5sRg+Y0CpvERAqncAJ41hpprHxjrsgK7l5JjPb RHdIvZPwCcDqVg
    iaGnlxMRKM+JpOuWwwCCW1w=
    =0/tE
    -----END PGP SIGNATURE-----

    Kirk Guest

  4. #4

    Default Re: Automounting smbfs?

    Kirk Strauser wrote:
     
    >
    >[...]
    >
    >Out of curiosity, why would you do that instead of just letting FreeBSD
    >mount it automatically (which is what I do now)?
    >
    >
    >[/ref]


    I'm assuming that it's a minor league paranoid measure to ensure
    that, in the event the windows host(s) are unavailable, you don't
    hang up the boot process somehow. That's what it is for *me*,
    anyhow. (I don't even list smbfs shares in /etc/fstab....)

    AFAIK, it would just delay booting a bit, but IANAE. That's why I do
    it from cron, anyway; that, and because I learned about cron long
    before I learned about rc scripts...

     

    I'm no help there, I'm afraid. I do have scripts now that do my
    post-install configuration, and might be tweaked to "push out"
    smbfs mounts (via cron, as mentioned above), but that's about
    it...nothing so complex as LDAP. :)

    Kevin Kinsey
    Kevin Guest

  5. #5

    Default Re: Automounting smbfs?



    ----- Original Message -----
    From: "Kirk Strauser" <com>
    To: <org>
    Sent: Friday, April 08, 2005 3:40 PM
    Subject: Re: Automounting smbfs?

    On Friday 08 April 2005 14:12, you wrote:
     

    [...]

    Out of curiosity, why would you do that instead of just letting FreeBSD
    mount it automatically (which is what I do now)?

    The goal I'm trying to accomplish is pushing the same map to multiple
    machines (eg via LDAP). I never bothered to do that with my NFS mounts,
    but I'm using the addition of the SMB shares as an excuse to rework the
    system before it grows much more.
    --
    Kirk Strauser


    In my experience, automounting it via fstab doesn't always work correctly.
    Some folks have great success with it where others don't. For example, I can
    remove the noauto and with the very same config files and 5 out of 10 times
    the mount won't take on system startup. When I remove the noauto and cron it
    for reboot, it works just fine. I've no idea why but it works for me.


    --

    Micheal Patterson
    Senior Communications Systems Engineer
    405-917-0600

    Confidentiality Notice: This e-mail message, including any attachments,
    is for the sole use of the intended recipient(s) and may contain
    confidential and privileged information. Any unauthorized review, use,
    disclosure or distribution is prohibited. If you are not the intended
    recipient, please contact the sender by reply e-mail and destroy all
    copies of the original message.

    Micheal Guest

Similar Threads

  1. Replies: 0
    Last Post: July 4th, 11:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139