Page 79 of 88
Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 12:40 pm
by Evgeny
looks like shares search part is not working
if specify folder names in SHARES="" all works
Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 1:12 pm
by zoelechat
Well, smbclient is sometimes capricious, I personnally got rid of it a while ago to use nmblookup instead

Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 9:06 pm
by Evgeny
init scripts have execution time limit?
Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 9:29 pm
by zoelechat
No, you can start Samba script as latest with sleep how-long-you-need inside it.
Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 9:58 pm
by Evgeny
i think need add sleep after smbclient and before mount
but I don't know how to do it
Code: Select all
get_shares()
{
if [ -z "$SHARES" ] ; then
echo "Search Shares" >> $LOGFILE
for i in $SERVERS ; do
echo "on: $i" >> $LOGFILE
S_MOUNTS=$(smbclient -U ${USER}%${PASSWD} \
-g -L $i -d 10| grep "Disk|" | grep -v "\\$" | grep -v " Service" | sed -r 's/.*\|(.*)\|.*/\1/' | sed -r 's/ /SGOspace/g')
# -g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | cut -d "|" -f2)
[ -n "$S_MOUNTS" ] && do_mount $i
done
else
echo -n "Fixed Server: " >> $LOGFILE
for i in $SERVERS ; do
echo $i >> $LOGFILE
S_MOUNTS=$SHARES
[ -n "$S_MOUNTS" ] && do_mount $i
done
fi
}
Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 10:10 pm
by zoelechat
You should first try simply at the beginning of script, otherwise at the beginning of do_mount() maybe

Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 10:37 pm
by Evgeny
does not work =(
Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 10:39 pm
by zoelechat
If it works on 2nd run, duplicate it to run it twice

Re: [How To] Get root access on F series
Posted: Thu Apr 07, 2016 11:02 pm
by Evgeny
not work
I'm confused
Re: [How To] Get root access on F series
Posted: Fri Apr 08, 2016 6:13 pm
by Evgeny
smbclient return shares if started manually
and return nothing if started automatically with samygo
why is this happening?
how to get shares with nmblookup?