William Stone III‎ > ‎Geek Cred‎ > ‎Snippets‎ > ‎

SMBNETFS Configuration

posted Sep 3, 2012, 2:33 PM by William Stone   [ updated Nov 18, 2012, 3:01 PM by William Stone ]
I use smbnetfs for access to my NAS shares. Unfortunately, this turns out to be slightly more difficult than it should be.

In Back|Track 5 R3, the procedure is:
  1. Install smbnetfs.

    sudo apt-get install smbnetfs

  2. Create a user directory ~/.smb:

    mkdir ~/.smb

  3. Copy /etc/smbnetfs.conf to ~/.smb:

    cp /etc/smbnetfs.conf ~/.smb

  4. Create a file ~/.smb/smbnetfs.auth and put in it:

    auth [workgroup] [domain_or_workgroup/]user password

  5. Change the permissions on ~/.smb/smbnetfs.auth:

    chmod 600 ~/.smb/smbnetfs.auth

  6. Mount with the command:

    smbnetfs -o uid=[user's uid],gid=[user's gid],umask=0022 [path/to/mountpoint]
Optionally, one might create a script containing the required smbnetfs command.

I'm still working on making the hosts visible by default.