[ale] sh script problem

Gary Maltzen maltzen at mm.com
Thu Sep 21 18:01:27 EDT 2000


Perhaps because you are using 'mount' instead of 'smbmount'...

This works for me (hoping Lookout Express hasn't scre^H^H^H^H 'interpreted'
the URL)

  smbmount "//Gary/Two Words" /mnt/it -U Gary -W DomainName

Michael Phillips asked:

> I am attempting to write a script that will redirect the output of tree to
a
> file for further processing. For the curious, the files are located on a
> wincrap server and I am mounting the shares via my Linux workstation. The
> script looks like this:
>
> #!/bin/sh
> MNTDIR="/ntdrive"
> USERNAME="bigkahuna"
> PASSWORD="password"
> RESULTS="/root/scripts/ntshares"
>
> >$RESULTS
>
> echo "NT Share Scan. Performed on:" >> $RESULTS
> date >> $RESULTS
> echo "---------------------------------" >> $RESULTS
> echo "" >> $RESULTS
>
> for i in `cat ntdrives.list`
> do
>         echo "Cataloging $i for directory listing" >> $RESULTS
>         mount -t smbfs -o username=$USERNAME,password=$PASSWORD //$i
$MNTDIR
>         cd $MNTDIR
>         tree -as >> $RESULTS
>         cd /
>         umount $MNTDIR
>         echo "" >> $RESULTS
> done
>
> ntshares contains:
>
> /ntserver/Linux Security
> /ntserver/Chip's Stuff
> /ntserver/This-Is-Important
>
>
> The third share mounts fine so I am suspecting that the whitespace has
> something to do with being unable to mount the other two shares. I have
> tried the following variations, yet the script still craps out for the
Linux
> Security and Chip's Stuff shares:
>
> "/ntserver/Linux Security"
> '/ntserver/Linux Security'
> `/ntserver/Linux Security`
> ""/ntserver/Linux Security""
>
> What am I doing wrong?


--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list