Git Product home page Git Product logo

smb-automount's Introduction

SMB-AutoMount

This script will scan for all SMB devices in your network, then it will scan for all the shares on these devices and mount them.
It will create a file containing your credentials in plain text in /home/username/.smbcredentials.
It will also save the shares in etc/fstab so that they will be automatically mounted on startup.

The script needs to be executed as root.

Usage

sudo bash SMB-AutoMount.sh MOUNTPOINT_ROOT LINUX_USERNAME WINDOWS_USERNAME WINDOWS_PASSWORD WINDOWS_DOMAIN

MOUNTPOINT_ROOT

The root directory in which a folder for each smb device will be created. (The folders for the smb devices will then contain additional folders for the actual shares.)
My advice would be something like /media/windows-network.

LINUX_USERNAME

The user for which the shares should be accessable.
Note: I don't know what happens if you actually logon with a different user with the gui. Maybe it just works or it asks you for login details of every single share. I just havent tried it yet.

WINDOWS_USERNAME

The username that will be used for authentication to access the network shares.

WINDOWS_PASSWORD

The password that will be used for authentication to access the network shares.

WINDOWS_DOMAIN

The domain that will be used for authentication to access the network shares.

Disclaimer

I have only tested this with Ubuntu 16.04 on a corporate windows network.

smb-automount's People

Contributors

t-vk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jabastien

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.