Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-23-2005, 11:11 AM   #1
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian
Posts: 328

Rep: Reputation: 42
little help with bash scripts

I use a bash script to mount my windows shares in linux and I want to mount an sftp share with is as well using shfs.

The script is as follows...
/bin/mount -t smbfs -o username=xx,password=xx,uid=xx //host /mount_point
/bin/mount -t shfs user@at_host /mount_point -o cache=256,rnode=777

My problem is that the shfs mount needs a password but it doesn't seem to take it as an option like smbfs. Can I do it as part of the bash script?

Old 10-23-2005, 11:50 AM   #2
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
There's a software package out there called expect. Its page on can be found here.

I have not used it, but from what I read, it's intended to automate tasks that involve user input (like automating ftp, passwd, et.c). It might take a while to learn, but it might prove useful. In fact, you may already have it on your machine.
Old 10-26-2005, 06:17 PM   #3
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian
Posts: 328

Original Poster
Rep: Reputation: 42
I got it to work but the connection with the server doesn't like being mounted for long periods of time, so I have a script that I just run when I need to, makes things quicker, no need for typing long paths etc. Thanks for your help.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash scripts hoffmanyew Programming 3 08-11-2005 02:27 AM
Need Help With Bash Scripts the_woelf Linux - Software 4 06-30-2004 10:09 AM
Bash Scripts Skute Programming 7 03-12-2004 11:17 AM
$? in Bash scripts clinton Linux - Newbie 4 02-20-2004 12:15 PM
Bash scripts? BajaNick Programming 3 07-05-2003 11:13 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration