Find the answer to your Linux question:
Results 1 to 4 of 4
I'm running Linux Mint 11 and I'm trying to write a script that will mount a network drive and also ask for my username and password. I'm very new to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2012
    Posts
    2

    Mount network share and ask for username and password


    I'm running Linux Mint 11 and I'm trying to write a script that will mount a network drive and also ask for my username and password. I'm very new to Linux and I've gotten it to the point where it will mount if I provide it my username and then it will prompt my for my password. My problem is, many different people will be using this script and I need it to also prompt for username.

    Here's what I have so far:
    sudo mount -t cifs //myshare.share.com/share /home/user/Desktop/backup -o username=myusername

    I originally thought that if I just left out the username= that it would then prompt me but it just gives me an access denied error.

    Thanks for any help and/or advice you can provide.

  2. #2
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,998
    I don't think a script is going to work without some intense (kind of) programming. If you have people access the drives through natilus it automatically asks for username/password. What's the point of the script if this can already be done with a file browser?
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  3. #3
    Just Joined!
    Join Date
    Mar 2012
    Posts
    2
    Here's my situation:
    1. I'm trying to create a linux USB key that I can boot from and copy data from the host (windows) computer to a network share. The host machine will then be reimaged with a fresh copy of windows and the backed up data copied back down to it.
    2. I'm trying to make it as simple as possible for my techs so that they don't have to go through a bunch of manual mapping. I would like for them to be able to run the script, type in their usernames and passwords and have it map it for them.
    3. There's approximately 20 techs, all with different usernames of course.
    4. Each tech has network space allotted to them accessible through their credentials which is where they will be storing the data.

    There's a whole bunch of other stuff that I'd like for this script to do but I'll address that once I get there.

    Again, thanks for any help.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,998
    I'm looking into it but so far no luck. I've never done this kind of thing before and I still feel like it might require some programming to interact with samba but I'll continue looking through today and I'll post if I come up with anything
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

Posting Permissions

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