LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-23-2005, 10:11 AM   #1
sniff
Member
 
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE 12.2/3 x86_64, Debian
Posts: 307

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/bash
/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?

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

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
There's a software package out there called expect. Its page on freshmeat.net 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, 05:17 PM   #3
sniff
Member
 
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE 12.2/3 x86_64, Debian
Posts: 307

Original Poster
Rep: Reputation: 42
Hello,
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.

Phil
 
  


Reply


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 01:27 AM
Need Help With Bash Scripts the_woelf Linux - Software 4 06-30-2004 09:09 AM
Bash Scripts Skute Programming 7 03-12-2004 10:17 AM
$? in Bash scripts clinton Linux - Newbie 4 02-20-2004 11:15 AM
Bash scripts? BajaNick Programming 3 07-05-2003 10:13 PM


All times are GMT -5. The time now is 04:20 PM.

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