Hi,
I'd appreciate any help with an irritating problem. I'm using Fedora 3 with KDE 3.3.
I frequently need to access a large number of externel servers from my dekstop. Most of these are locked down accept for ssh so I mount the drives through fuse using sshfs. I've written a short shell script to mount the drives for me:
>>>
mntsers.sh
>>>
mount -t cifs //serve/uname /mnt/serve -o user=uname,domain=domain,rw
sshfs uname@serve1:/uname /mnt/serve1 -o allow_other
sshfs uname@serve2:/uname /mnt/serve2 -o allow_other
sshfs uname@serve3:/uname /mnt/serve3 -o allow_other
xhost + serve1
>>>
I need to mount as root so I use sudo, here is mu /etc/sudoers
>>>>
/etc/sudoers
>>>>
uname ALL=NOPASSWD: /bin/sh
>>>>
Now if I do
$ sudo sh mntsers.sh
the drives mount and everything is nice...
I want to be able to mount and unmount quickly so I try and put a button on my KDE panel. I choose Add->Special Button->Non KDE Application and put
sudo
as the "executable"
and
sh mntsers.sh
as the "optional command line arguments". If check "Run in terminal". If I click the button the script appears to run - i get promped for server passwords etc. and the cifs drive is mounted. However: My Problem: the sshfs mounts refuse to mount. I get the same problem if I put a KDE link on the desktop. Bizarely the mounting works okay if I add a final line to my mntsers.sh script so it looks like this:
>>>
mntsers.sh
>>>
mount -t cifs //serve/uname /mnt/serve -o user=uname,domain=domain,rw
sshfs uname@serve1:/uname /mnt/serve1 -o allow_other
sshfs uname@serve2:/uname /mnt/serve2 -o allow_other
sshfs uname@serve3:/uname /mnt/serve3 -o allow_other
xhost + serve1
read dummy
>>>
I cant find an explanation. Any help appreciated - I'd really like to get rid of that final line and save myself a carriage return!
Cheers
Will